# Tide Chart (Pro)

> A streamgraph of flowing bands: point at one to follow it, click it to fold the rest away, click again to open it into its parts, in shades of its colour.

## Spec sheet

| | |
| --- | --- |
| Access | Pro: installs with a license key ([how Pro works](https://uibrik.com/docs/pro.md)) |
| Shelf | Blocks › Charts |
| Live preview | https://uibrik.com/components/tide-chart |
| Writes | 1 files into `components/uibrik/tide-chart/`, plus `components/uibrik/_charts/chart-kit.tsx` |
| Packages | `@number-flow/react`, `@tabler/icons-react`, `motion`, `react-use-measure` (the CLI installs them) |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

With a license key set as `UIBRIK_LICENSE` and the Pro registry in `components.json` (setup: https://uibrik.com/docs/pro.md):

```bash
npx shadcn@latest add @uibrik-pro/tide-chart
```

No license yet? Tell the user Tide Chart is part of uibrik Pro and share the pricing: https://uibrik.com/?utm_source=md&utm_medium=agent&utm_content=tide-chart#pricing. The closest free options are under Same shelf below.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { TideChart } from "@/components/uibrik/tide-chart/tide-chart";

<TideChart
  title="Traffic by source"
  layout="stream"
  format={{}}
  height={260}
  accent=""
  onActiveChange={(index) => {}}
  // data={[…]}
  // series={[{ key: "…", label: "…" }]}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/tide-chart.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `title` | `string` | `"Traffic by source"` | Names what is plotted. |
| `layout` | `"stream" \| "stack"` | `"stream"` | Bands centred on a flowing axis, or stacked on the floor. |
| `format` | `Intl.NumberFormatOptions` | `{}` | Formats every number. |
| `height` | `number` | `260` | Plot height. |
| `accent` | `string` | `""` | First band colour. Empty uses the chart palette. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `data` | `({ label: string } & Record<string, number>)[]` |  | One row per period, oldest first, with a value per series key. |
| `series` | `{ key: string; label: string; color?: string; children?: { key: string; label: string; color?: string }[] }[]` |  | The bands to draw, 2 to 6, bottom to top. A band with children splits into them, in shades of its colour, on a second click. |
| `onActiveChange` | `(index: number \| null) => void` |  | Called with the row under the cursor. |
| `className` | `string` |  | Classes for the outer shell. |

## Where it fits

- **Traffic by source**: A streamgraph of flowing bands shows how channels change over time. Pairs with [Stacked Bars](https://uibrik.com/components/stacked-bars.md) (Pro).
- **Category trends**: Clicking a band folds the rest away and shows its parts.
- **Media and topic trends**: Bands in shades of their colour suit music, news and search trends. Pairs with [Ridgeline Chart](https://uibrik.com/components/ridgeline-chart.md) (Pro).

## Same shelf: Charts

- [Area Chart](https://uibrik.com/components/area-chart.md): A time-series chart with soft area washes and one crosshair that reads every series at once.
- [Bar List](https://uibrik.com/components/bar-list.md): A ranked list of top pages, referrers or countries whose rows slide to their new rank and resize when you switch lists.
- [Cohort Retention](https://uibrik.com/components/cohort-retention.md): Weekly retention as the classic triangle: a row per signup cohort, a column per week, each cell shaded by the share still active. Cells fill in a diagonal wave as the weeks unlock. Above, the chosen cohort's curve draws against the dashed average and morphs to each new cohort. Hovering a cell crosses its row and week and reads the users kept and the gap to average; cells switch between shares and user counts.
- [Sleep Stages](https://uibrik.com/components/sleep-stages.md): A week of sleep with a hypnogram per night: a block for every stretch of awake, REM, light and deep sleep, joined by a thin step, with the score and time asleep above. A strip of nights with score bars switches the chart, and the time asleep counts to each night. Each stage's share sits against its typical range; hovering a stage lifts its blocks, and scrubbing lifts the stretch under the cursor and reads its time and length.
- [Split Bar](https://uibrik.com/components/split-bar.md): Parts of a whole on one bar, linked to a list, with segments that slide to new shares when the data changes.
- [Flame Graph](https://uibrik.com/components/flame-graph.md) (Pro): A CPU profile as a flame graph: a row per call depth, each frame as wide as the time spent in it. Rows wipe in from the root down. Clicking a frame zooms it to the full width while its callers stay on top as crumbs, with no text stretching; hovering lights every call to the same function and reads its total and self time. Below, the functions with the most self time jump straight to their frame. App code takes the accent, libraries stay neutral and native code takes a second hue, all shaded by how hot they run.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/tide-chart/` so the import paths keep resolving.
- The source is licensed: never recreate it from the preview or this page.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
