Skip to content
mdxcn is now part of Shadcn Labs. details

waffle

GraphWaffle

A grid of 100 cells, filled to the value. Write `73% — tests green` inside the tag.

use it
Good for a share shown as a grid of about a hundred cells.
instead
Labeled parts of a whole is Stack.

written

The value, then the caption after an em dash.

[ TESTS ]

91%

182 of 200 green

91 percent. 182 of 200 green
<GraphWaffle title="TESTS">91% — 182 of 200 green</GraphWaffle>

install

command

coverage

One hundred cells. Value is how many are lit.

[ COVERAGE ]

73%

73 of 100 tests green

73 percent. 73 of 100 tests green
import { GraphWaffle } from "@/registry/default/graph-waffle/graph-waffle"

<GraphWaffle title="COVERAGE" value="73%" caption="73 of 100 tests green" />

quota

Fewer cells. Same 0–1 value.

[ QUOTA ]

40%

seats used

40 percent. seats used
import { GraphWaffle } from "@/registry/default/graph-waffle/graph-waffle"

<GraphWaffle
  title="QUOTA"
  value={0.4}
  cells={40}
  columns={8}
  caption="seats used"
/>
[ PROPS ]
PropTypeDefaultDescription
titlestring—Caption drawn on the top edge of the frame.
valuenumber | "73%"—Share from 0 to 1. Optional when children are Markdown.
childrenMarkdown—73% — tests green
cellsnumber100Total cells in the grid.
columnsnumber10Cells per row.
captionstring—Muted line under the percent.
glyphs"shade" | "ascii" | "hash" | "bar" | string[]"shade"Character set. shade is ·░▒▓█. ascii is .- =#@. Pass a preset or your own characters.
palette"mono" | "duo" | "multi""mono"mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents.
cornerstring"+"Character at each corner of the frame.
frame"box" | "corners" | "rule" | "none""box"box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content.
classNamestring—Passed to the outer frame.