Skip to content

BlockPicker#

A color picker that lets users choose a color from a grid of available colors.

BlockPicker

Basic BlockPicker

Inherits: LayoutControl

Properties

Events

Example#


Properties#

available_colors class-attribute instance-attribute #

available_colors: list[ColorValue] | None = None

A list of available colors to pick from.

color class-attribute instance-attribute #

color: ColorValue | None = None

The currently selected color.

Events#

on_color_change class-attribute instance-attribute #

on_color_change: ControlEventHandler[BlockPicker] | None = (
    None
)

Called when the picker color is changed.

The data property of the event handler argument contains the color value as a hex string.