Chroma Panel

Search documentation

Find a page or section

PanelFooter

The footer row: the current colour, and the ones you used before.

Anatomy

import { PanelFooter, pushRecent } from "chroma-panel";

The footer shows the current colour once, alongside the recent-colour history. The history row fades on whichever side has more swatches.

Adding to the history yourself

function pushRecent(list: string[], hex: string, limit?: number): string[]

Adds a colour to a recent list, de-duplicated and capped. Exported so your own controls can match the panel's behaviour.

Turn the row off entirely with showRecentColors={false} on the panel, or control it with recentColors and onRecentColorsChange — see controlled and uncontrolled.