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
Side Nav
The app's side navigation: clinic switcher, search, sections with counts and the signed-in user.
import { SideNav } from "@/registry/vcare/site/widgets/side-nav"
export default function SiteSideNavDemo() {
// 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-[640px] w-[230px]">
<SideNav />
</div>
</div>
)
}Installation
npx shadcn@latest add @vcare/site-side-navOr install directly from the URL: https://ui.vcarehms.com/r/site-side-nav.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/side-nav.tsx
import { LuCalendar, LuFlaskConical, LuLandmark, LuLayoutDashboard, LuListOrdered, LuPill, LuReceipt, LuSearch, LuStethoscope, LuUsers, LuUsersRound } from 'react-icons/lu';
import type { IconType } from 'react-icons';
import { Avatar } 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]';
/** The app's side navigation: clinic switcher, search, sections with counts and the signed-in user. */
export function SideNav({ active = 'Patients' }: { active?: string }) {
const items: [IconType, string, string?][] = [[LuLayoutDashboard, 'Dashboard'], [LuUsers, 'Patients', '24'], [LuCalendar, 'Appointments'], [LuListOrdered, 'Queue', '6'], [LuStethoscope, 'Visits'], [LuFlaskConical, 'Lab'], [LuPill, 'Pharmacy'], [LuReceipt, 'Invoices'], [LuLandmark, 'Accounts'], [LuUsersRound, 'HR']];
return (
<div className={`${card} flex h-full flex-col !p-3`}>
<div className="flex items-center gap-2 rounded-xl bg-[#f7f7f9] p-2"><img src="/img/logo.png" alt="" width="26" height="26" className="h-[26px] w-[26px] rounded-md" /><div className="leading-tight"><p className="text-[12px] font-semibold text-ink">VCare</p><p className="text-[10.5px] text-[#6b7280]">Northview Clinic</p></div></div>
<div className="mt-2.5 flex items-center gap-2 rounded-lg bg-[#f4f5f7] px-2.5 py-1.5 text-[11.5px] text-[#9aa0ad]"><LuSearch size={12} />Search <span className="ml-auto rounded bg-white px-1 text-[10px]">⌘K</span></div>
<ul className="mt-2.5 space-y-0.5">
{items.map(([I, l, n]) => (
<li key={l} className={`flex items-center gap-2.5 rounded-lg px-2.5 py-[7px] text-[12px] font-medium ${l === active ? 'bg-primary/10 text-primary' : 'text-[#5b6270]'}`}><I size={14} />{l}{n && <span className={`ml-auto rounded px-1.5 text-[10px] font-semibold ${l === active ? 'bg-primary text-white' : 'bg-[#eef0f3] text-[#6b7280]'}`}>{n}</span>}</li>
))}
</ul>
<div className="mt-auto flex items-center gap-2 rounded-xl bg-[#f7f7f9] p-2"><Avatar name="Nora Bennett" size={26} /><div className="leading-tight"><p className="text-[11.5px] font-semibold text-ink">Nora Bennett</p><p className="text-[10px] text-[#6b7280]">Front desk</p></div></div>
</div>
);
}Usage
import { SideNav } from "@/components/site/widgets/side-nav"Exports
SideNav
Dependencies
react-icons@^5.7.0(npm)@vcare/site-kit(registry)@vcare/site-theme(registry)
Raw item: /r/site-side-nav.json