Components
- Activity Heatmap
- Activity Rings
- Bar Chart
- Bar List
- Command Palette
- Composed Chart
- Corner Frame
- Data Table
- Delta Badge
- Distribution Bar
- Donut Chart
- Dot Plot
- Funnel Chart
- Heatmap Chart
- KPI Card
- Metric List
- Metric Value
- Period Tabs
- Radar Chart
- Radial Gauge
- Sankey Chart
- Scatter Chart
- Segmented Meter
- Sparkline
- Tick Bar
- Timeline
- Trend Chart
Blocks
- Activity Rings Card
- Allocation Card
- Balance Chart Card
- Breakdown Card
- Commerce KPI Row
- Contributions Card
- Data Table Card
- Distribution Card
- Dot Plot Card
- Dual Metric Card
- Funnel Chart Card
- Goal Chart Card
- Heatmap Chart Card
- Insight Card
- KPI Row Card
- Metric Tabs Chart Card
- Payment Summary Card
- Period Bar Chart Card
- Progress Card
- Revenue Ring Card
- Ring KPI Card
- Score Gauge Card
- Stage Bars Card
- Status Gauge Card
- Tick KPI Card
A single-series bar chart with gradient or striped fills, highlighted bars, and a hover marker.
"use client"
import { BarChart } from "@/components/ui/bar-chart"A single-series bar chart for shadcn/ui with gradient or striped fills, a highlighted subset of bars, and a hover marker. Use it for spend by week, signups by day, or anything where one series and a highlighted period tell the story.
Installation#
pnpm dlx shadcn@latest add @dashboardcn/bar-chartAlso installs chart from shadcn/ui if missing.
Usage#
import { BarChart } from "@/components/ui/bar-chart"
<BarChart
data={data}
xKey="week"
yKey="spend"
groupKey="month"
color="var(--color-orange-500)"
highlight={(row) => row.month === "Mar"}
yFormatter={(value) => formatNumber(value, { format: "currency" })}
/>Examples#
Striped#
Set variant to "striped" for diagonal bands. mutedColor defaults to gray; pass the bar color for a tint of the same hue.
"use client"
import { BarChart } from "@/components/ui/bar-chart"Your dashboard, your code.
Every component is copied into your project with the shadcn CLI. No package to upgrade, nothing to override.