Documentation menu
Getting Started
Components
Primitives
- Agent Thinking
- Alert
- Alert Dialog
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Checkbox
- Command
- Command Palette
- Context Menu
- Data Table
- Dialog
- Dropdown Menu
- Empty
- Field
- Glow Cloud
- Input
- Label
- Medication Schedule
- Period Tabs
- Popover
- Rainbow Button
- Scroll Area
- Select
- Selectable Card
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Tag
- Textarea
- Timeline
- Tooltip
- Use Count Up
Charts and metrics
Patterns
- Confirm Button
- Date Picker
- Embedded
- Empty State
- Entity Drawer
- Error Boundary
- Field Row
- File Dropzone
- Form Dialog
- Kv
- List Editor
- List Page
- Live Time
- Mini Table
- Money
- Note Field
- Note Text
- Page Card
- Page Header
- Page Tabs
- Page Toolbar
- Person Cell
- Picture Field
- Print Card
- Range Switcher
- Row Actions
- Search Input
- Search Select
- Selected Box
- Signature Pad
- Status Badge
- Sub Nav Layout
- Suggest Input
- Tab Icons
- Table Footer
- Theme Accent Picker
- Time Picker
- View All Link
Dashboard cards
Advanced
Device frames
Website widgets
Website screens
Website panels
Dashboard cards
Stat Cards
A responsive row of KPI cards.
import { StatCards } from "@/registry/vcare/ui/stat-cards"
export default function StatCardsDemo() {
return (
<StatCards
className="w-full"
items={[
{ id: "visits", label: "Visits today", value: 148, delta: 0.06, trend: [110, 120, 132, 128, 140, 148] },
{ id: "revenue", label: "Collections", value: 248000, format: "currency", currency: "INR", delta: 0.11, trend: [180, 200, 210, 220, 240, 248] },
{ id: "wait", label: "Average wait", value: "14 min", delta: -0.08, invertDelta: true, trend: [20, 18, 17, 16, 15, 14] },
{ id: "beds", label: "Beds free", value: 12, delta: -0.14, trend: [18, 17, 15, 14, 13, 12] },
]}
/>
)
}Installation
npx shadcn@latest add @vcare/stat-cardsOr install directly from the URL: https://ui.vcarehms.com/r/stat-cards.json
- Add the registry items it uses: kpi-card, utils.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/ui/stat-cards.tsx
import { KpiCard, type KpiCardProps } from '@/registry/vcare/ui/kpi-card';
import { cn } from '@/registry/vcare/lib/utils';
/** A responsive row of KPI cards. Wraps `KpiCard` so every dashboard lays its headline numbers out the same way. */
export function StatCards({ items, className }: { items: (KpiCardProps & { id: string })[]; className?: string }) {
return (
<div data-slot="stat-cards" className={cn('grid grid-cols-2 gap-3 xl:grid-cols-4', className)}>
{items.map(({ id, ...item }) => (
<KpiCard key={id} {...item} />
))}
</div>
);
}Usage
import { StatCards } from "@/components/ui/stat-cards"Exports
StatCards
Dependencies
@vcare/kpi-card(registry)@vcare/utils(registry)
Raw item: /r/stat-cards.json