Waffle chart
Parts of a whole as a grid of squares you can count.
100 in all · each square is 1%
| Category | Value | Share | Cells |
|---|---|---|---|
| Design | 38 | 38.0% | 38 |
| Engineering | 46 | 46.0% | 46 |
| Operations | 16 | 16.0% | 16 |
When to use
- Percentages that should feel tangible.
- A friendlier alternative to a pie.
When not to use
- More than five parts.
Installation
terminal
pnpm dlx shadcn@latest add @caliper/waffle-chart
Adds its 5 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
WaffleChart
6 props
PropTypeDefault
label *string—
data *readonly ChartPart[]—
unitstring""
loadingboolean—
errorstring—
classNamestring—
Keyboard
- Home
- Jumps to the first item or the minimum.
- End
- Jumps to the last item or the maximum.
- ↑
- Moves to the previous item or value.
- ↓
- Moves to the next item or value.
- ←
- Moves to the previous item or value.
- →
- Moves to the next item or value.
- PageUp
- Moves by a larger step, or to the previous page.
- PageDown
- Moves by a larger step, or to the next page.
- Escape
- Closes or cancels, then returns focus to where it came from.
Accessibility
It exposes group and status semantics, with aria-label, aria-busy, aria-roledescription, aria-hidden and aria-pressed 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/waffle-chart.mdThe index of every part is at /llms.txt.