TidalUI

Cohort table preview

Compare exact cohort percentages with separate missing and future states, a semantic desktop table, and compact phone summaries.

pro · Data · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/cohort-table

Import components/ui/tidal.css, components/ui/cohort-table.css. Wrap installed components in tidal-scope.

Preview

Cohort table component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/cohort-table.css";
import{TidalCohortTable}from"./components/ui/cohort-table";
export default()=><div className="tidal-scope"><TidalCohortTable periods={[{id:"example",label:"Demo"}]} rows={[{id:"example",label:"Demo",population:1,reachedPeriods:1,values:{}}]} title={"Demo"}/></div>;

API and props

TidalCohortTable.periods (required)
ReadonlyArray<TidalCohortPeriod>

Required periods value accepted by this exported component.

TidalCohortTable.rows (required)
ReadonlyArray<TidalCohortRow>

Required rows value accepted by this exported component.

TidalCohortTable.title (required)
ReactNode

Required title value accepted by this exported component.

TidalCohortTable.description
ReactNode

Optional description value accepted by this exported component.

TidalCohortTable.formatPopulation
((value: number) => string) | undefined

Optional format population value accepted by this exported component.

TidalCohortTable.formatValue
((value: number) => string) | undefined

Optional format value value accepted by this exported component.

TidalCohortTable.headingLevel
"h2" | "h3" | "h4" | "h5" | "h6" | undefined

Optional heading level value accepted by this exported component.

TidalCohortTable.labels
Partial<{ cohort: string; population: string; missing: string; future: string; empty: string; invalid: string; table: string; }> | undefined

Optional labels value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas