Skip to content
caliper ui pro docs

Color flood

Colour things by dropping paint on them. Drag a swatch onto a folder and the new colour floods out from where it landed until it fills the tile; without dragging, choose a folder, then a swatch.

Pro

When to use

  • Colouring folders, labels, projects and calendars.
  • Tagging by colour in boards and file managers.

When not to use

  • Choosing any colour; use `ColorPicker`.
  • Many items at once; use a bulk action.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/color-flood

Adds its 2 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

API reference

ColorFlood

4 props

Also accepts the native props of its root element and a ref.

PropTypeDefaultDescription
label *string—Names the set, e.g. "Folders".
items *FloodItem[]—
colors *FloodColor[]—
onChange((id: string, color: string) => void)—

Keyboard

Enter
Activates the focused control.
Space
Activates the focused control.

Accessibility

It exposes group semantics, with aria-label, aria-pressed, aria-hidden and aria-live kept in step with state. Changes that matter are announced through a live region.

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/color-flood.md

The index of every part is at /llms.txt.

More in Surfaces