Skip to main content

ColorPicker

Allow users to select a color from a color palette.

Anchor to alpha
alpha
boolean
Default: false

Allow user to select an alpha value.

Anchor to defaultValue
defaultValue
string

The default value for the field.

Anchor to formResetCallback
formResetCallback
() => void
string

An identifier for the field that is unique within the nearest containing form.

Anchor to value
value
string

The currently selected color.

Supported formats include:

  • HSL

Learn more about registering events.

Anchor to change
change
<typeof tagName> | null
Anchor to input
input
<typeof tagName> | null
Examples
<s-color-picker value="#FF0000" alpha />

Preview

  • Use the alpha slider if you want to allow merchants to select a transparent color
Was this page helpful?