A line chart that scrolls as live samples arrive, with a threshold line.
Import it and pass your content. The props that matter most are listed next.
"use client";
import * as React from "react";
import { LiveLineChart } from "@/components/ui/notchset/live-line-chart";
/** Push one sample a second and drop the oldest; the chart scrolls on each change. */
export function LatencyStream({ sample }: { sample: () => number }) {
const [buffer, setBuffer] = React.useState(() => Array.from({ length: 61 }, () => 150));
React.useEffect(() => {
const iv = setInterval(() => setBuffer((b) => [...b.slice(1), sample()]), 1000);
return () => clearInterval(iv);
}, [sample]);
return <LiveLineChart data={buffer} threshold={{ value: 400, label: "SLO 400MS" }} />;
}data–
number[]Oldest first; push one and drop one per tick.
live–
booleanScroll on new data.
threshold–
{ value, label }The dashed signal rule.
spikeAt / yMax / ticks / xLabels–
number / number[] / string[]Scale and spikes.
LiveLineChartdata-slot="live-line-chart"
The chart.
findSpikesdata-slot="—"
Spike indexes, for a header count.
components/ui/notchset/live-line-chart.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.
pnpm dlx shadcn@latest add @beautiful-ui-pro/live-line-chartNeeds 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.
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.
Give your coding assistant the Markdown guide instead of screenshots.
https://beautiful-ui.dev/api/mcp (setup)v1.0.0 · 2026-10-02
First release
Pro is in early access.