Stat
DataMITKPI metric card with trend indicator, icon, and period comparison. Group with StatGroup.
bun add @otfdashkit/ui
Preview
StatData
Loading Storybook preview…
Code
@otfdashkit/uiimport { User, BarChart2, Star } from 'lucide-react'
import { Stat, StatGroup } from '@otfdashkit/ui'
export function Example() {
return (
<StatGroup className="max-w-2xl">
<Stat label="Total Revenue" value="$48,295" trend={12.5} trendLabel="vs last month" icon={<BarChart2 className="h-5 w-5" />} />
<Stat label="Active Users" value="2,340" trend={-3.2} trendLabel="vs last week" icon={<User className="h-5 w-5" />} />
<Stat label="Avg Rating" value="4.8" trend={0.3} trendLabel="this quarter" icon={<Star className="h-5 w-5" />} />
</StatGroup>
)
}
Free with the SDK. This component ships in @otfdashkit/ui under the MIT license.
Kit for this component
SaaS Dashboard Kit$99
Show one metric with its label and change for a dashboard.
Props
Props declared in the Stat source. Inherited HTML attributes are not listed.
| Prop | Type | Default | Description |
|---|---|---|---|
| labelrequired | string | ||
| valuerequired | string | number | ||
| className | string | ||
| description | string | ||
| icon | ReactNode | ||
| trend | number | ||
| trendLabel | string |