Skip to content

Palette ​

Palette shows a color scheme as one rectangle, and chooses it when pressed.

When to use ​

Use it in a group of schemes, one of which is chosen. label is the name of the scheme, which is what a screen reader says. The application arranges the palettes, in a Row with wrap, and gives the group role="radiogroup".

Props ​

PropDefaultDescription
colorsrequiredThe colors, in order
labelrequiredThe name of the scheme
selfalseChosen
disabledfalseCannot be chosen
onclickCalled when pressed

Contract ​

The rectangle is as high as a small button, each color gap-md wide with no gap between them, inside one line in line-strong; the chosen palette's line is blue-ink, with no surface or shadow added. Each palette is a radio. Disabled is dimmed.

Example ​

Palette

Released under the Apache-2.0 license.