uibrik

Live Line

New

Preview

Customize

Interval1000ms
Points60
Accent

Usage

import { LiveLine } from "@/components/uibrik/live-line/live-line";

<LiveLine />

Installation

npx shadcn@latest add https://uibrik.com/r/live-line.json
Adds the files to components/uibrik/live-line and installs @number-flow/react, @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/live-line.

Props

LiveLine
title
Type string
"Visitors right now"
Names the metric.
interval
Type number
1000
Time between samples.
points
Type number
60
Samples across the plot.
unit
Type string
"visitors"
Sits beside the headline.
accent
Type string
""
Line colour. Empty uses the chart palette.
value
Type number
–
Latest reading, sampled once every interval. Leave out to show simulated traffic.
format
Type Intl.NumberFormatOptions
{}
Formats every number, e.g. { style: "percent" }.
paused
Type boolean
–
Stops sampling. Leave out to let the Live button manage it.
onPausedChange
Type (paused: boolean) => void
–
Called when the Live button is pressed.
className
Type string
–
Classes for the outer shell.