# ComparisonTable

A feature matrix whose rows and columns stay connected to their meaning.

- Family: Data, imported from `mizu-ui` or `mizu-ui/data`
- Docs: https://mizu.user64bit.world/components/comparison-table
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/data/Records.tsx

## Usage

```tsx
import { ComparisonTable } from "mizu-ui";

export function Example() {
  return (
    <ComparisonTable
      label="Release formats"
      columns={["Source", "Package"]}
      rows={[
        { label: "Typed declarations", values: [false, true] },
        { label: "Inspectable source", values: [true, true] },
        { label: "Setup", values: ["Copy files", "Install once"] },
      ]}
    />
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/comparison-table
```

## Props

- `columns`: `string[]`. Column headings.
- `rows`: `{label: string; values: (string | boolean)[]}[]`. Feature rows aligned to the columns.
- `label`: `string`. Table caption.

## Accessibility

Row/column headers and caption are native. Boolean values use Included/Not included text; missing cells display a dash.

## Motion

Static, scrollable table.
