Performance Report

Dashboard report with a date range picker and previous-period compare switch, rolling KPI cards with delta badges, an area trend chart that adds the previous period as a muted series, a breakdown table with inline growing bars, and auto-generated highlights that stagger in, with skeletons holding the layout while a new range loads.

Preview

Performance Report preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/performance-report
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

data
PerformanceReportData | null

Report contents for the current range. `null` renders the loading state.

—
loading?
boolean

Show skeletons (e.g. while a new range loads).

false
range?
DateRange | null
—
defaultRange?
DateRange | null
—
onRangeChange?
((range: { from: Date; to: Date; }) => void)
—
presets?
DateRangePreset[]
—
compare?
boolean

Controlled previous-period comparison.

—
defaultCompare?
boolean
true
onCompareChange?
((compare: boolean) => void)
—
insights?
ReportInsight[]

Override the auto-generated highlights.

—
title?
ReactNode
Performance
locale?
string

Default "en-US".

en-US
chartHeight?
number

Trend chart plot height in px. Default 110.

110
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated