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 widgets
Patients Table
A patients table with department and status filters, search, status tags, last visit and amount due.
import { PatientsTable } from "@/registry/vcare/site/widgets/patients-table"
export default function SitePatientsTableDemo() {
// Sized as on the website: the widget fills the box it is given.
return (
<div className="vc-site grid place-items-center overflow-x-auto rounded-2xl bg-[#f5f6f8] p-6">
<div className="h-[300px] w-full min-w-[640px] max-w-[760px]">
<PatientsTable />
</div>
</div>
)
}Installation
npx shadcn@latest add @vcare/site-patients-tableOr install directly from the URL: https://ui.vcarehms.com/r/site-patients-table.json
- Install the dependencies:
npm i react-icons - 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/widgets/patients-table.tsx
import { LuChevronsUpDown, LuSearch } from 'react-icons/lu';
import { Avatar, Badge, Item, type TagTone } from '../ui/kit';
const card = 'rounded-2xl bg-white p-4 text-left shadow-[0_1px_2px_rgb(15_27_45/0.04),0_10px_28px_-10px_rgb(15_27_45/0.14)] ring-1 ring-black/[0.06]';
const rows: [string, string, string, TagTone, string, string][] = [
['Anna Meyer', 'Cardiology', 'Checked in', 'blue', 'Nov 17, 2026', '$0'],
['Daniel Reed', 'General', 'Insurance pending', 'amber', 'Nov 17, 2026', '$420'],
['Maria Lopez', 'Cardiology', 'Billed', 'green', 'Nov 16, 2026', '$0'],
['James Carter', 'Orthopaedics', 'In consultation', 'violet', 'Nov 16, 2026', '$180'],
['Sofia Novak', 'Physiotherapy', 'Payment due', 'red', 'Nov 15, 2026', '$650'],
];
/** A patients table with department and status filters, search, status tags, last visit and amount due. */
export function PatientsTable() {
return (
<div className={`${card} h-full !p-0`}>
<div className="flex items-center gap-2 border-b border-[#ebecf0] px-4 py-3">
<p className="mr-auto text-[13px] font-semibold text-ink">Patients <span className="ml-1 text-[#9aa0ad]">24 today</span></p>
{['All departments', 'All statuses'].map((f) => <span key={f} className="flex items-center gap-1 rounded-lg bg-[#f4f5f7] px-2.5 py-1 text-[11px] font-medium text-[#4b5160]">{f}<LuChevronsUpDown size={11} /></span>)}
<span className="flex w-28 items-center gap-1.5 rounded-lg bg-[#f4f5f7] px-2.5 py-1 text-[11px] text-[#9aa0ad]"><LuSearch size={11} />Search</span>
</div>
<div className="grid grid-cols-[1.5fr_1fr_1.1fr_1fr_0.6fr] gap-3 bg-[#f7f7f9] px-4 py-2 text-[10.5px] font-semibold uppercase tracking-wide text-[#9aa0ad]"><span>Patient</span><span>Department</span><span>Status</span><span>Last visit</span><span className="text-right">Due</span></div>
{rows.map(([n, d, s, t, v, b], i) => (
<Item key={n} i={i * 0.4} className="grid grid-cols-[1.5fr_1fr_1.1fr_1fr_0.6fr] items-center gap-3 border-t border-[#f1f2f5] px-4 py-2.5 text-[12px]">
<span className="flex items-center gap-2.5 font-semibold text-ink"><Avatar name={n} size={24} />{n}</span><span className="text-[#4b5160]">{d}</span><span><Badge tone={t}>{s}</Badge></span><span className="text-[#6b7280]">{v}</span><span className="text-right font-semibold text-ink">{b}</span>
</Item>
))}
</div>
);
}Usage
import { PatientsTable } from "@/components/site/widgets/patients-table"Exports
PatientsTable
Dependencies
react-icons@^5.7.0(npm)@vcare/site-kit(registry)@vcare/site-theme(registry)
Raw item: /r/site-patients-table.json