AsterUIDocsv1.0.2

Docs / Component reference

ColorPicker

Choose a swatch when an approximate color will do, or enter a hex value when the color is already specified.

Color picker example

Install

sh
npx @fierst/ui@1.0.2 add color-picker

Registry dependencies: theme.

Exports from ./ui/color-picker: ColorPicker.

Download the registry source for color-picker 1.0.2.

API contracts

ts
export function* ColorPicker(
  props: {
    label?: string;
    value?: string;
    defaultValue?: string;
    swatches?: readonly string[];
    onChange?: (hex: string) => void;
    class?: string;
  },
  ctx: Ctx,
)