Pro
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.
pnpm dlx shadcn@latest add @caliper/color-floodWhen to use
Use it for
- Colouring folders, labels, projects and calendars.
- Tagging by colour in boards and file managers.
Skip it when
- Choosing any colour; use `ColorPicker`.
- Many items at once; use a bulk action.
Decisions
Why it is built this way, so you know what to keep when you change your copy.
Behaviour
- Flood from the drop
- The colour spreads from the exact point it landed, so the change reads as poured, not swapped.
Usage
- Two ways in
- Drag a swatch, or choose a folder (a toggle button) and then a swatch; each change is announced.
Installation
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.
Usage
Import it from your copy of the source. The example behind the preview comes with the source.
import { ColorFlood } from "@/components/ui/color-flood"
The worked example comes with Pro
The 41-line example behind the preview opens here, ready to copy.
- 602 Pro parts, blocks and page templates, all with source
- $199 once, with a year of updates. What you have stays yours
- A full refund within 14 days if it is not for you
API reference
ColorFlood
component
Also accepts the native props of its root element and a ref.
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.
Motion
It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.
Related
- Swatch pickerA row of colour swatches with one selection ring that glides to the chosen colour, wrapping rows included. The chosen swatch steps in to make room for the ring.
- Color pickerPick a colour from swatches or a free spectrum, with a contrast readout.
- File managerA file browser with folders, selection, rename and delete.