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
Website panels
Inventory Panel
Inventory: stock levels by batch with expiry and low stock warnings.
import Inventory from "@/registry/vcare/site/panels/Inventory"
export default function SiteInventoryPanelDemo() {
// The width of a third-width Departments card.
return (
<div className="vc-site grid place-items-center overflow-x-auto rounded-2xl bg-[#f5f6f8] p-6">
<div className="w-full max-w-[340px]">
<Inventory />
</div>
</div>
)
}Installation
npx shadcn@latest add @vcare/site-inventory-panelOr install directly from the URL: https://ui.vcarehms.com/r/site-inventory-panel.json
- Install the dependencies:
npm i motion - Add the registry items it uses: site-kit, site-theme.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/site/panels/Inventory.tsx
import { motion } from 'motion/react';
import { Badge, Item, Panel } from '../ui/kit';
const rows = [
['Paracetamol 500mg', 'B2291 · Exp Mar 2027', 82, null],
['Amoxicillin 500mg', 'B1187 · Exp Jan 2027', 34, 'Low stock'],
['Insulin glargine', 'B0932 · Exp Dec 2026', 18, 'Expiring'],
] as const;
export default function Inventory() {
return (
<Panel title="Stock">
<div className="px-4 py-1.5">
{rows.map(([n, b, q, flag], i) => (
<Item key={n} i={i} className="border-b border-[#f1f2f5] py-2.5 last:border-0">
<div className="flex items-center justify-between gap-2 text-[12px]"><span className="font-semibold text-ink">{n}</span>{flag && <Badge tone={flag === 'Low stock' ? 'amber' : 'red'}>{flag}</Badge>}</div>
<p className="mt-0.5 text-[10.5px] text-[#6b7280]">{b}</p>
<div className="mt-1.5 h-1.5 rounded-full bg-[#eef0f3]">
<motion.div className={`h-full rounded-full ${q < 40 ? 'bg-[#eba11d]' : 'bg-vcare'}`} initial={{ width: 0 }} whileInView={{ width: `${q}%` }} viewport={{ once: true }} transition={{ duration: 1, delay: 0.3 + i * 0.1, ease: [0.25, 1, 0.5, 1] }} />
</div>
</Item>
))}
</div>
</Panel>
);
}Usage
import Inventory from "@/components/site/panels/Inventory"
<Inventory />Exports
Inventory (default)
Dependencies
motion@^14.14.0(npm)@vcare/site-kit(registry)@vcare/site-theme(registry)
Raw item: /r/site-inventory-panel.json