Sparkline preview
Show a compact ordered trend with exact start, end and change context.
pro · Data · composite
When to use
- Use it when a page needs show a compact ordered trend with exact start, end and change context.
- Choose it when the data structure, labels, and state are supplied by the application and must remain consumer controlled.
Alternatives
- Choose analytics-card instead when explore revenue, compare periods and inspect chart values is the actual interface need, rather than sparkline.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/sparklineImport components/ui/tidal.css, components/ui/sparkline.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/sparkline.css";
import{TidalSparkline}from"./components/ui/sparkline";
export default()=><div className="tidal-scope"><TidalSparkline label={"Demo"} points={[{id:"example",label:"Demo",value:1}]}/></div>;API and props
TidalSparkline.label (required)stringRequired label value accepted by this exported component.
TidalSparkline.points (required)ReadonlyArray<TidalSparklinePoint>Required points value accepted by this exported component.
TidalSparkline.activePointIdstring | null | undefinedOptional active point id value accepted by this exported component.
TidalSparkline.changeContentReactNodeOptional change content value accepted by this exported component.
TidalSparkline.changeLabelstring | undefinedOptional change label value accepted by this exported component.
TidalSparkline.changeUnavailableTextstring | undefinedOptional change unavailable text value accepted by this exported component.
TidalSparkline.defaultActivePointIdstring | null | undefinedOptional default active point id value accepted by this exported component.
TidalSparkline.emptyContentReactNodeOptional empty content value accepted by this exported component.
TidalSparkline.endLabelstring | undefinedOptional end label value accepted by this exported component.
TidalSparkline.formatValue((value: number) => string) | undefinedOptional format value value accepted by this exported component.
TidalSparkline.inspectableboolean | undefinedOptional inspectable value accepted by this exported component.
TidalSparkline.onActivePointChange((pointId: string, point: TidalSparklinePoint, source: TidalSparklineInspectSource, event: MouseEvent<HTMLButtonElement>) => void) | undefinedCallback invoked when the active point change interaction is proposed.
TidalSparkline.startLabelstring | undefinedOptional start label value accepted by this exported component.
TidalSparkline.tableCaptionstring | undefinedOptional table caption value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Supply truthful data and labels; the component does not fetch, aggregate, or persist records.