Component libraryStats grid
Components/Marketing

Stats grid

Pro

A responsive four-card metric grid for consumer-owned values, comparisons, and detail links.

npx shadcn@latest add @tidal-pro/stats-grid
Desktop viewport

Installation

Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.

Terminal
npx shadcn@latest add @tidal-pro/stats-grid

Import components/ui/tidal.css, components/ui/stats-grid.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 and metrics are required. Each metric has a stable id, consumer-owned ReactNode label/value, optional comparison/detail/trend and valueKey for a finite visual transition. Supplied trend choices render independently of comparison copy and receive a readable word and distinct marker in addition to color. Optional ReactNode slots use nullish presence checks, preserving values such as numeric zero. Optional metric href/linkProps/ref render native anchors when href is present, including an explicit empty string; metrics without href remain noninteractive articles. Optional action forwards native anchor attributes/ref. The root forwards native section attributes/ref, uses a collision-safe generated heading id, derives safe metric label semantics from headingLevel, and supports description, eyebrow, headingLevel and arbitrary emptyMessage content. Values are displayed exactly as supplied; the component performs no aggregation, formatting, fetching, storage, analytics or adoption claim. Reduced motion removes value transitions and native links retain 44px-plus targets.

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.

Building with an agent?Give it the installation guide and component catalog.