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
Device frames
iPhone frame
An iPhone 16 Pro frame around screenshots (cross fading between several) or any live content. Ships with the frame artwork.
import { IPhoneFrame } from "@/registry/vcare/site/devices/iphone-frame"
export default function SiteIphoneFrameDemo() {
return (
<div className="vc-site flex flex-wrap items-end justify-center gap-8 p-6">
<IPhoneFrame srcs={["/shots/app-home.webp"]} alt="Patient app home" className="w-[220px]" />
<IPhoneFrame srcs={["/shots/staff-today.webp"]} alt="Staff app today" className="w-[180px]" />
</div>
)
}Installation
npx shadcn@latest add @vcare/site-iphone-frameOr install directly from the URL: https://ui.vcarehms.com/r/site-iphone-frame.json
- Add the registry items it uses: site-theme.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/site/devices/iphone-frame.tsx
import type { ReactNode } from 'react';
/**
* An iPhone 16 Pro frame (from Apple's marketing asset kit) around a screen. Put screenshots in `srcs` (several cross fade on
* `active`) or any live content in `children`; it is clipped to the screen's rounded corners. Size it with a width class.
* The frame artwork is installed to public/img/iphone-frame.svg; pass `frameSrc` if you keep it elsewhere.
*/
export function IPhoneFrame({
srcs = [],
active = 0,
alt = '',
children,
shadow = true,
frameSrc = '/img/iphone-frame.svg',
className = '',
}: {
srcs?: string[];
active?: number;
alt?: string;
/** Live content for the screen, shown on top of any screenshots. */
children?: ReactNode;
shadow?: boolean;
frameSrc?: string;
className?: string;
}) {
return (
<div className={`relative ${className}`} style={{ aspectRatio: '1310 / 2710' }}>
<div className="absolute overflow-hidden bg-white" style={{ left: '3.97%', top: '1.62%', width: '92.06%', height: '96.75%', borderRadius: '7.9% / 3.6%' }}>
{srcs.map((s, i) => (
<img key={s} src={s} alt={i === active ? alt : ''} aria-hidden={i !== active} width={680} height={1478} loading="lazy" className="absolute inset-0 h-full w-full object-cover transition-opacity duration-500" style={{ opacity: i === active ? 1 : 0 }} />
))}
{children && <div className="absolute inset-0 overflow-y-auto pt-[14%]">{children}</div>}
</div>
<img src={frameSrc} alt="" width={1310} height={2710} className={`pointer-events-none absolute inset-0 h-full w-full ${shadow ? 'drop-shadow-[0_30px_40px_rgb(15_27_45/0.28)]' : ''}`} />
</div>
);
}Usage
import { IPhoneFrame } from "@/components/site/devices/iphone-frame"Examples
Live
import { IPhoneFrame } from "@/registry/vcare/site/devices/iphone-frame"
import { QueueCardMini } from "@/registry/vcare/site/minis/queue-card-mini"
import { ReminderMini } from "@/registry/vcare/site/minis/reminder-mini"
import { VitalsMini } from "@/registry/vcare/site/minis/vitals-mini"
// Any content can go on the screen, not only screenshots.
export default function SiteIphoneFrameLive() {
return (
<div className="vc-site flex justify-center p-6">
<IPhoneFrame className="w-[240px]">
<div className="grid gap-2 bg-[#f4f6f9] p-3">
<p className="text-[13px] font-semibold text-ink">Today</p>
<QueueCardMini />
<VitalsMini />
<ReminderMini />
</div>
</IPhoneFrame>
</div>
)
}Exports
IPhoneFrame
Dependencies
@vcare/site-theme(registry)
Raw item: /r/site-iphone-frame.json