Pass a color. A string that is not a color throws, so check text from people first. Inside a color parent, it reads that color.
brand-swatch.tsx
ColorSwatch
| Prop | Type | Default | Description |
|---|---|---|---|
| aria-label | string | — | Defines a string value that labels the current element. |
| aria-labelledby | string | — | Identifies the element (or elements) that labels the current element. |
| aria-describedby | string | — | Identifies the element (or elements) that describes the object. |
| aria-details | string | — | Identifies the element (or elements) that provide a detailed, extended description for the object. |
| id | string | — | The element's unique identifier. See MDN. |
| dir | string | — | |
| lang | string | — | |
| inert | boolean | — | |
| translate | "no""yes" | — | |
| suppress | boolean | — | A React-only flag that suppresses the warning React normally logs when an element's server-rendered content doesn't match the client render during hydration. See React docs. |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | MouseEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | TouchEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | PointerEventHandler<HTMLDivElement> | — | |
| on | UIEventHandler<HTMLDivElement> | — | |
| on | UIEventHandler<HTMLDivElement> | — | |
| on | WheelEventHandler<HTMLDivElement> | — | |
| on | WheelEventHandler<HTMLDivElement> | — | |
| on | AnimationEventHandler<HTMLDivElement> | — | |
| on | AnimationEventHandler<HTMLDivElement> | — | |
| on | AnimationEventHandler<HTMLDivElement> | — | |
| on | AnimationEventHandler<HTMLDivElement> | — | |
| on | AnimationEventHandler<HTMLDivElement> | — | |
| on | AnimationEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| on | TransitionEventHandler<HTMLDivElement> | — | |
| slot | string | null | — | A slot name for the component. Slots allow the component to receive props from a parent component. An explicit null value indicates that the local props completely override all props received from a parent. |
| render | — | Overrides the default DOM element with a custom render function. This allows rendering existing components with built-in styles and behaviors such as router links, animation libraries, and pre-styled components. Requirements: - You must render the expected element type (e.g. if <button> is expected, you cannot render an <a>). - Only a single root DOM element can be rendered (no fragments). - You must pass through props and ref to the underlying DOM element, merging with your own prop as appropriate. | |
| color | string | Color | — | The color value to display in the swatch. |
| color | string | — | A localized accessible name for the color. By default, a description is generated from the color value, but this can be overridden if you have a more specific color name (e.g. Pantone colors). |
| rounded | "default""full" | — | |
| size | "default""lg""sm" | — | |
| class | string | — | |
| style | CSSProperties | — | Inline styles. An object only: the component sets the color in --color-swatch-color. |





