Components

Timeseries Card

Card-wrapped daily time-series chart (area or bar) with a hidden Y axis, dashed grid, brand-token colour, styled tooltip and an empty state.

Timeseries Card

A card with a title, optional description and a daily time-series chart built on Recharts. Dates in YYYY-MM-DD form are shown as M/D on the X axis; other strings pass through unchanged. When data is empty, the card shows emptyNote instead of a chart.

Installation

Terminal
$npx shadcn@latest add @vandoko/timeseries-card

Usage

import { TimeseriesCard } from "@/components/timeseries-card";

const data = [
  { date: "2026-11-10", value: 120 },
  { date: "2026-11-11", value: 184 },
  { date: "2026-11-12", value: 152 },
];

export default function Page() {
  return (
    <TimeseriesCard
      title="Sessions"
      description="Last 3 days"
      data={data}
      valueLabel="Sessions"
    />
  );
}

Props

PropTypeDefaultDescription
titlestring—Card title
descriptionstring—Text under the title
data{ date: string; value: number }[]—One point per day
variant"area" | "bar""area"Chart type
valueLabelstring—Label for the value in the tooltip
colorVarstring"var(--chart-1)"Brand chart token for the series colour
emptyNotestring—Shown when data is empty
classNamestring—Extra classes on the card

On this page