Skip to main content
PROYECTOVIVIANA

ColorSwatchPicker

The props declared for ColorSwatchPicker, generated from the types @proyecto-viviana/ui ships.

Import

import { ColorSwatchPicker } from "@proyecto-viviana/ui";

Props

Props for ColorSwatchPicker in @proyecto-viviana/ui
PropTypeDefaultDescription
children*JSX.Element—The ColorSwatches within the ColorSwatchPicker.
density'compact' | 'regular' | 'spacious''regular'The amount of padding between the swatches.
size'S' | 'M' | 'L' | 'XS''M'The size of the color swatches.
rounding'default' | 'none' | 'full''none'The corner rounding of the color swatches.
stylesStylesProp—Spectrum-defined generated classes.
UNSAFE_classNamestring | UnsafeClassName—Additional CSS class name. Use only as a last resort.
UNSAFE_styleJSX.CSSProperties—Additional inline styles. Use only as a last resort.
classstring—Backward-compatible class alias. Prefer UNSAFE_className for S2 parity.
slotstring—A slot name for the component.
idstring—The element's unique identifier. solidaria-components
onChange(color: Color) => void—Handler called when the selected color changes. solidaria-components
aria-describedbystring—ID of element that describes the swatch picker. solidaria-components
aria-detailsstring—ID of element that provides detailed information about the swatch picker. solidaria-components
aria-labelstring—Accessible label for the swatch picker. solidaria-components
aria-labelledbystring—ID of element that labels the swatch picker. solidaria-components
valuestring | Color—The current color value (controlled). solidaria-components
defaultValuestring | Color—The default color value (uncontrolled). solidaria-components

Declared in packages/viviana-ui/src/color/ColorSwatchPicker.tsx.

ColorSwatchPickerItem props

Props for ColorSwatchPickerItem in @proyecto-viviana/ui
PropTypeDefaultDescription
classstring—Additional CSS class name.
childrennumber | boolean | RenderedElement | ArrayElement | (string & {}) | Node | JSX.ArrayElement | ((renderProps: ColorSwatchPickerItemRenderProps) => JSX.Element)—The children of the swatch item. solidaria-components
slotstring | false—A slot name for the component. HTML `slot` may be `false` to omit. solidaria-components
aria-labelstring—Accessible label for this item. solidaria-components
isDisabledfalse | true—Whether this item is disabled. solidaria-components
color*string | Color—The color represented by this swatch item. solidaria-components

Declared in packages/viviana-ui/src/color/ColorSwatchPicker.tsx.

Props marked solidaria or solidaria-components come from the headless layer underneath and behave the same in both registers. Components that wrap a DOM element also accept that element's standard attributes, which are left out here on purpose — listing them would bury the props that are actually ours.