Analytics card preview
Explore revenue, compare periods and inspect chart values.
pro · Data · composite
When to use
- Use it when a page needs explore revenue, compare periods and inspect chart values.
- Choose it when the data structure, labels, and state are supplied by the application and must remain consumer controlled.
Alternatives
- Choose data-table instead when sortable column controls, native row selection and a scrollable table is the actual interface need, rather than analytics card.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/analytics-cardImport components/ui/tidal.css, components/ui/analytics-card.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/analytics-card.css";
import{TidalAnalyticsCard}from"./components/ui/analytics-card";
export default()=><div className="tidal-scope"><TidalAnalyticsCard onPeriodChange={() => {}} period={"value"} periods={[{id:"example",label:"Demo",total:1,change:1,data:[{label:"Demo",value:1}]}]} title={"Demo"}/></div>;API and props
TidalAnalyticsCard.onPeriodChange (required)(period: string) => voidCallback invoked when the period change interaction is proposed.
TidalAnalyticsCard.period (required)stringRequired period value accepted by this exported component.
TidalAnalyticsCard.periods (required)Array<AnalyticsPeriod>Required periods value accepted by this exported component.
TidalAnalyticsCard.title (required)stringRequired title value accepted by this exported component.
TidalAnalyticsCard.classNamestring | undefinedOptional class name value accepted by this exported component.
TidalAnalyticsCard.formatValue((value: number) => string) | undefinedOptional format value 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.