Skip to content
Colour swatches, light
Light
Colour swatches, dark
Dark

Every state

  • Colour swatches, default, light
    Colour swatches, default, dark

    default

  • Colour swatches, hover, light
    Colour swatches, hover, dark

    hover

  • Colour swatches, focus, light
    Colour swatches, focus, dark

    focus

  • Colour swatches, selected, light
    Colour swatches, selected, dark

    selected

  • Colour swatches, error, light
    Colour swatches, error, dark

    error

  • Colour swatches, disabled, light
    Colour swatches, disabled, dark

    disabled

Props

PropTypeDefaultWhat it does
idstring"colour"Id prefix; each option is `${id}-${value}`.
namestring"colour"Form field name.
legendstring"Colour"The group's visible label.
optionsChoiceCardSwatchOption[]–Colours: value, name, color (any CSS colour), soldOut.
defaultValuestring"sage"The colour chosen at the start.
onValueChange(value: string) => void–Called with the chosen colour.
requiredboolean–Requires a choice before the form submits.
disabledboolean–Disables the whole group.
errorstring–Error message; marks the group invalid.
classNamestring–Extra classes on the fieldset.

More choice cards

All 12
choice-card-11 is in UI ProGet UI Pro, €199

Preview

Open the page
In UI Pro: get it, €199 once

With every block and theme. 400+ buyers since 2020. Plans