ColorSwatches API
API reference docs for theColorSwatches
component. For examples and details on the usage of this component, visit the component demo page.
Props
Props | Type | Description | Default |
---|---|---|---|
|
| Used as a prefix for the aria-label of each swatch | _ |
|
| A list of colors (hex codes) for the user to pick from | _ |
|
| Allows the consumer to provide a custom element for the first swatch | _ |
|
| Allows the consumer to provide a custom element for the last swatch | _ |
|
| Used as the HTML 'name' attribute for each swatch input | _ |
|
| Callback function that is called when the color changes | _ |
|
| The number of rows to display |
|
|
| The width and height of the options |
|
|
| The currently selected color | _ |