Skip to content

ChartsLumen Halo

Waffle ChartProv1.0.0

Parts of a whole as a ten by ten grid where every square is one percent, so a share is something you can count. Squares keep their place when the data change and only the ones that change hands recolour; the list beside it gives each share and value.

Built on shadcn/ui charts conventions

.md
pnpm dlx shadcn@latest add @beautiful-ui-pro/lumen-waffle-chart

Needs your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.

Styles didn't apply?

The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.

Set up the Beautiful UI registry

Free pieces install from their URL with no setup (that URL gives the Base UI build; Radix projects use /r/radix-nova/<name>.json, or add the registries below and the CLI picks your build). Pro pieces need the registries below and BEAUTIFUL_UI_TOKEN in .env.local.

components.json
{
  "registries": {
    "@beautiful-ui": "https://beautiful-ui.dev/r/{style}/{name}.json",
    "@beautiful-ui-pro": {
      "url": "https://beautiful-ui.dev/r/pro/{style}/{name}.json",
      "headers": { "Authorization": "Bearer ${BEAUTIFUL_UI_TOKEN}" }
    }
  }
}

MCP server

claude mcp add --transport http beautiful-ui https://beautiful-ui.dev/api/mcp
Catalog for agents: /llms.txt

Usage

Import it and pass your content. The props that matter most are listed next.

Example
"use client";
import { WaffleChart } from "@/components/ui/lumen/charts/waffle-chart";

const plans = [
  { plan: "starter", accounts: 412 },
  { plan: "growth", accounts: 268 },
  { plan: "scale", accounts: 96 },
];

const config = {
  starter: { label: "Starter", color: "var(--chart-1)" },
  growth: { label: "Growth", color: "var(--chart-2)" },
  scale: { label: "Scale", color: "var(--chart-3)" },
};

export function PlanMix() {
  return <WaffleChart data={plans} name="plan" value="accounts" config={config} label="Accounts by plan" />;
}

Props

  • data / name / value–

    Row[] / field / field

    One row per group: its name and amount. Shares come from the total.

  • config–

    ChartConfig

    Colour and label per group name. Unlisted groups take the series colours in order.

  • size10

    number

    Squares per side; 10 gives one square per percent.

  • legend"list"

    "list" | "none"

    Each group's share and value beside the grid (below on narrow cards).

  • gridSize260

    number

    The grid's largest width in px.

  • valueFormat–

    StatFormat | (n) => string

    Values in the list, table and summary.

Show all 9 props
  • active / onActiveChange / onSelect–

    string | null / (name) => void / (name) => void

    The focused group, controlled; and a group was clicked or Enter pressed.

  • motion"full"

    "full" | "subtle" | "off"

    Squares light in fill order; reduced motion always wins.

  • loading / error / emptyText / label–

    boolean / string / string / string

    States in words with the height held, and the chart's accessible name.

Source

components/ui/lumen/charts/waffle-chart.tsx

This component is included with Pro.

Try the live preview above. Get Pro to install the source.