Skip to main content

ColorPicker

Allow users to select a color from a color palette.

boolean

Allow user to select an alpha value.

string

The default value for the field.

() => void
string

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

string

The currently selected color.

Supported formats include:

For RGB and RGBA, both the legacy syntax (comma-separated) and modern syntax (space-separate) are supported.

Was this section helpful?

Learn more about registering events.

<typeof tagName> | null
<typeof tagName> | null
Was this section helpful?

Code

<s-color-picker
value="#FF0000"
alpha
></s-color-picker>

Preview