Skip to main content
A user input component that allows users to select a color using a color picker interface.

Fields

NameTypeDescriptionOptions
LabelText--
Color ListObjectList of predefined colors-
Custom CSS classesTextCSS classes, separated by spaces. You can define classes in custom stylesheets.-

Events

Capture changes as they happen.

def onchange_handler(state, payload):

# Set the state variable "new_color" to the new value, provided as string.

state["new_color"] = payload
Capture changes once this control has lost focus.

def onchange_handler(state, payload):

# Set the state variable "new_color" to the new value, provided as string.

state["new_color"] = payload
I