Usage
Use ColorSwatch to display color:
Example with default Mantine theme colors:
Alpha channel
Color swatch has checkers background – you can use it to show transparency in colors:
Size and radius
ColorSwatch does not have predefined size values, use number to set width and height in px, radius has predefined xs, sm, md, lg, xl values from theme.radius:
Custom component
Use any component or element with ColorSwatch by setting component
prop:
Get root element ref
You can get root element ref with ref
prop:
Feedback
Your feedback is most valuable contribution to the project, please share how you use Mantine, what features are missing and what is done good
Leave feedback