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 kit
Website kit
The website's building blocks: Frame (the framed product shot), Phone, Reveal (fade and rise into view), Badge, Avatar, Panel, Kpi, Btn and the icon set.
import { LuCalendarCheck, LuReceipt, LuUsers } from "react-icons/lu"
import { Avatar, Badge, Btn, Kpi, Panel } from "@/registry/vcare/site/ui/kit"
export default function SiteKitDemo() {
return (
<div className="vc-site grid gap-4 rounded-2xl bg-[#f5f6f8] p-6">
<div className="grid gap-3 sm:grid-cols-3">
<Kpi icon={<LuUsers size={16} />} label="Patients today" value="148" />
<Kpi icon={<LuCalendarCheck size={16} />} label="Appointments" value="62" tone="green" />
<Kpi icon={<LuReceipt size={16} />} label="Collected" value="₹2.4L" tone="violet" />
</div>
<Panel title="Waiting now" action={<Badge tone="amber">3 waiting</Badge>}>
<ul className="divide-y">
{["Meera Raghavan", "Arjun Nair", "Sana Iqbal"].map((n) => (
<li key={n} className="flex items-center gap-3 px-4 py-2.5 text-[13px]">
<Avatar name={n} /> <span className="font-medium text-ink">{n}</span>
<Badge tone="blue" className="ms-auto">General</Badge>
</li>
))}
</ul>
</Panel>
<div className="flex flex-wrap gap-2">
<Btn>Book a demo</Btn>
<Btn variant="outline">See how a visit works</Btn>
</div>
</div>
)
}Installation
npx shadcn@latest add @vcare/site-kitOr install directly from the URL: https://ui.vcarehms.com/r/site-kit.json
- Install the dependencies:
npm i motion react-icons - Add the registry items it uses: site-iphone-frame, site-theme.
- Copy these 5 files into your project and change the
@/registry/vcare/…imports to your own paths.
components/site/icons.tsx
import type { IconType } from 'react-icons';
import { LuLayoutGrid, LuLayers, LuBrain, LuChartColumn, LuShieldCheck, LuUsers, LuStethoscope, LuFlaskConical, LuPill, LuBedDouble, LuReceipt, LuLandmark, LuPackage, LuUsersRound, LuMessageCircle, LuHospital, LuHeartPulse, LuHouse, LuSmartphone, LuLifeBuoy, LuInfo, LuMail, LuActivity, LuCalendarCheck, LuDumbbell, LuIdCard } from 'react-icons/lu';
/** Icon names used in lib/pages.js, mapped once so the menu only ships the icons it needs. */
export const ICONS: Record<string, IconType> = {
grid: LuLayoutGrid, layers: LuLayers, brain: LuBrain, chart: LuChartColumn, shield: LuShieldCheck, users: LuUsers, stethoscope: LuStethoscope, flask: LuFlaskConical,
pill: LuPill, bed: LuBedDouble, receipt: LuReceipt, landmark: LuLandmark, package: LuPackage, team: LuUsersRound, chat: LuMessageCircle, hospital: LuHospital,
heart: LuHeartPulse, home: LuHouse, phone: LuSmartphone, help: LuLifeBuoy, info: LuInfo, mail: LuMail, activity: LuActivity, calendar: LuCalendarCheck, dumbbell: LuDumbbell, badge: LuIdCard,
};components/site/ui/Frame.tsx
import type { ReactNode } from 'react';
/**
* The hero's blueprint look, for any section heading: a softly glowing rounded panel, hairlines that run the full width of the page
* above and below it, short streaks of light on those lines, a dot on each side and faint side panels at the page edges.
* `light` is for white sections (lines in brand blue); `dark` is for blue bands (lines in white).
*/
export function Frame({ children, className = '', tone = 'light' }: { children: ReactNode; className?: string; tone?: 'light' | 'dark' }) {
const t = tone === 'dark' ? 'bp-dark' : '';
return (
<div className={`bp ${t} relative ${className}`}>
<span aria-hidden="true" className="bp-rule top-0" />
<span aria-hidden="true" className="bp-rule bottom-0" />
<span aria-hidden="true" className="bp-glint left-[8%] top-0 w-[22%]" />
<span aria-hidden="true" className="bp-glint right-[4%] bottom-0 w-[18%]" />
<span aria-hidden="true" className="bp-ghost bp-ghost-l top-[22%] h-[18%]" />
<span aria-hidden="true" className="bp-ghost bp-ghost-l top-[46%] h-[44%]" />
<span aria-hidden="true" className="bp-ghost bp-ghost-r top-[22%] h-[18%]" />
<span aria-hidden="true" className="bp-ghost bp-ghost-r top-[46%] h-[44%]" />
<div className="bp-panel relative my-6 px-6 py-10 sm:my-8 sm:px-12 sm:py-12">
<span aria-hidden="true" className="bp-glint left-[14%] -top-px w-[16%]" />
<span aria-hidden="true" className="bp-glint right-[10%] -bottom-px w-[20%]" />
<span aria-hidden="true" className="bp-dot -left-[4px] top-1/2" />
<span aria-hidden="true" className="bp-dot -right-[4px] top-[38%]" />
<div className="relative">{children}</div>
</div>
</div>
);
}components/site/ui/Phone.tsx
import { IPhoneFrame } from '../devices/iphone-frame';
/** The iPhone frame with app screenshots inside, as the website sections use it. Same as IPhoneFrame with a required alt. */
export default function Phone({ srcs, active = 0, alt, className = '' }: { srcs: string[]; active?: number; alt: string; className?: string }) {
return <IPhoneFrame srcs={srcs} active={active} alt={alt} className={className} />;
}components/site/ui/Reveal.tsx
import type { ReactNode } from 'react';
import { motion } from 'motion/react';
/** Fade and rise into view once. Content is still in the server rendered HTML for crawlers. */
export function Reveal({ children, delay = 0, className, as = 'div' }: { children: ReactNode; delay?: number; className?: string; as?: 'div' | 'li' | 'article' | 'h2' | 'h3' | 'p' }) {
const M = motion[as] as typeof motion.div;
return (
<M className={className} initial={{ opacity: 0, y: 24 }} whileInView={{ opacity: 1, y: 0 }} viewport={{ once: true, amount: 0.2, margin: '0px 0px -8% 0px' }} transition={{ duration: 0.8, delay, ease: [0.25, 1, 0.5, 1] }}>
{children}
</M>
);
}components/site/ui/kit.tsx
import type { ReactNode } from 'react';
import { motion } from 'motion/react';
/**
* A small kit that mirrors the VCare web app's own components (surfaces, tags, avatars, KPI cards),
* so the marketing screens look like the product and not like a drawing of it.
*/
const TAG = {
blue: 'bg-[#e6efff] text-[#1d4ed8]',
green: 'bg-[#e3f6ea] text-[#166534]',
amber: 'bg-[#fff3d6] text-[#92400e]',
red: 'bg-[#fde8e8] text-[#b42318]',
violet: 'bg-[#efeaff] text-[#5b3fd0]',
teal: 'bg-[#e3f4f1] text-[#0b7f73]',
neutral: 'bg-[#f1f2f5] text-[#4b5160]',
} as const;
export type TagTone = keyof typeof TAG;
export function Badge({ tone = 'neutral', children, className = '' }: { tone?: TagTone; children: ReactNode; className?: string }) {
return <span className={`inline-flex h-[22px] items-center gap-1 whitespace-nowrap rounded-full px-2.5 text-[11px] font-semibold ${TAG[tone]} ${className}`}>{children}</span>;
}
const AV = ['bg-[#e6efff] text-[#1d4ed8]', 'bg-[#e3f4f1] text-[#0b7f73]', 'bg-[#efeaff] text-[#5b3fd0]', 'bg-[#fde7ee] text-[#c01f52]', 'bg-[#fff3d6] text-[#92400e]'];
export function Avatar({ name, size = 28 }: { name: string; size?: number }) {
const initials = name.split(' ').map((w) => w[0]).slice(0, 2).join('');
const tone = AV[(name.charCodeAt(0) + name.length) % AV.length];
return <span className={`grid shrink-0 place-items-center rounded-full text-[10.5px] font-bold ${tone}`} style={{ width: size, height: size }}>{initials}</span>;
}
/** The app's card surface: white, hairline ring and a soft lift. */
export function Panel({ title, action, children, className = '' }: { title?: ReactNode; action?: ReactNode; children: ReactNode; className?: string }) {
return (
<div className={`overflow-hidden rounded-2xl bg-white text-left shadow-[0_1px_2px_rgb(15_27_45/0.04),0_12px_32px_-8px_rgb(15_27_45/0.14)] ring-1 ring-black/[0.06] ${className}`}>
{title && (
<div className="flex items-center justify-between gap-3 border-b border-[#ebecf0] px-4 py-3">
<p className="text-[13px] font-bold text-ink">{title}</p>
{action}
</div>
)}
{children}
</div>
);
}
export function Kpi({ icon, label, value, tone = 'blue' }: { icon: ReactNode; label: string; value: ReactNode; tone?: TagTone }) {
return (
<div className="flex items-center gap-3 rounded-xl bg-white p-3 ring-1 ring-black/[0.06]">
<span className={`grid h-9 w-9 shrink-0 place-items-center rounded-lg ${TAG[tone]}`}>{icon}</span>
<div className="min-w-0 leading-tight">
<p className="truncate text-[11px] text-[#6b7280]">{label}</p>
<p className="mt-0.5 text-[17px] font-bold text-ink">{value}</p>
</div>
</div>
);
}
export function Btn({ children, variant = 'primary', className = '' }: { children: ReactNode; variant?: 'primary' | 'outline'; className?: string }) {
const v = variant === 'primary' ? 'bg-primary text-white shadow-[inset_0_1px_0_rgb(255_255_255/0.2)]' : 'bg-white text-ink ring-1 ring-black/10';
return <span className={`inline-flex h-7 items-center gap-1.5 rounded-lg px-3 text-[11.5px] font-semibold ${v} ${className}`}>{children}</span>;
}
/** Rises into view once. `i` staggers siblings. */
export function Item({ i = 0, children, className = '' }: { i?: number; children: ReactNode; className?: string }) {
return (
<motion.div className={className} initial={{ opacity: 0, y: 12 }} whileInView={{ opacity: 1, y: 0 }} viewport={{ once: true, amount: 0.3 }} transition={{ duration: 0.6, delay: 0.12 + i * 0.08, ease: [0.25, 1, 0.5, 1] }}>
{children}
</motion.div>
);
}Usage
import { Badge, Avatar, Panel, Kpi, Btn, Item } from "@/components/site/ui/kit"Examples
Badges
import { Avatar, Badge, type TagTone } from "@/registry/vcare/site/ui/kit"
const tones: TagTone[] = ["blue", "green", "amber", "red", "violet", "teal", "neutral"]
export default function SiteKitBadges() {
return (
<div className="vc-site grid justify-items-center gap-4 p-6">
<div className="flex flex-wrap justify-center gap-2">{tones.map((t) => <Badge key={t} tone={t}>{t}</Badge>)}</div>
<div className="flex gap-2">{["Anna Meyer", "Daniel Reed", "Sana Iqbal", "James Carter"].map((n, i) => <Avatar key={n} name={n} size={24 + i * 6} />)}</div>
</div>
)
}Frame
import { Frame } from "@/registry/vcare/site/ui/Frame"
export default function SiteKitFrame() {
return (
<div className="vc-site overflow-hidden px-4">
<Frame className="mx-auto max-w-2xl text-center">
<h2 className="h-section">The blueprint frame</h2>
<p className="lead mt-4">Glowing panel, hairlines across the page and streaks of light, for any heading.</p>
</Frame>
</div>
)
}Phone
import Phone from "@/registry/vcare/site/ui/Phone"
export default function SiteKitPhone() {
return (
<div className="vc-site flex justify-center gap-6 p-6">
<Phone srcs={["/shots/app-home.webp"]} alt="Patient app home" className="w-[200px]" />
<Phone srcs={["/shots/staff-today.webp"]} alt="Staff app today" className="hidden w-[200px] sm:block" />
</div>
)
}Exports
Badge, Avatar, Panel, Kpi, Btn, Item
Dependencies
motion@^14.14.0(npm)react-icons@^5.7.0(npm)@vcare/site-iphone-frame(registry)@vcare/site-theme(registry)
Raw item: /r/site-kit.json