Component libraryAnalytics card
Analytics card
ProExplore revenue, compare periods and inspect chart values.
npx shadcn@latest add @tidal-pro/analytics-cardInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/analytics-card.css, components/ui/segmented-control.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
title, periods ({id,label,total,change,data:{label,value}[],comparison?:{label,value}[],breakdown?:{label,value}[]}[]), controlled period, onPeriodChange. Optional formatValue and className. Continuous rolling values and interpolated chart geometry; mouse/pen and native range keyboard inspection. Optional previous-period comparison and category breakdown. View data expands an accessible table. Change is percent vs prior period. Empty periods render a no-data state. Finite values only. Sample daily totals and breakdowns reconcile in the demo. Reduced motion resolves immediately to the final state.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.