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
Android frame
A modern Android phone drawn in CSS, in three finishes, around screenshots or any live content. No image needed.
import { AndroidFrame } from "@/registry/vcare/site/devices/android-frame"
export default function SiteAndroidFrameDemo() {
return (
<div className="vc-site flex flex-wrap items-end justify-center gap-8 p-6">
<AndroidFrame srcs={["/shots/app-labs.webp"]} alt="Lab tests in the patient app" className="w-[220px]" />
<AndroidFrame srcs={["/shots/staff-attendance.webp"]} alt="Staff attendance" finish="porcelain" className="w-[180px]" />
<AndroidFrame srcs={["/shots/app-rx.webp"]} alt="Medicines" finish="sage" className="w-[150px]" />
</div>
)
}Installation
npx shadcn@latest add @vcare/site-android-frameOr install directly from the URL: https://ui.vcarehms.com/r/site-android-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/android-frame.tsx
import type { ReactNode } from 'react';
/** Body colours: a dark obsidian, a light porcelain and a soft sage. */
const FINISH = {
obsidian: { body: '#1f2125', edge: '#3a3d43', button: '#2b2e33' },
porcelain: { body: '#ecebe7', edge: '#d3d1cb', button: '#d9d7d1' },
sage: { body: '#cfd8cf', edge: '#aebaae', button: '#bcc7bc' },
} as const;
/**
* A modern Android phone drawn in CSS: thin even bezels, a centred punch-hole camera and the power and volume keys on the right.
* No image is needed. Put screenshots in `srcs` (several cross fade on `active`) or any live content in `children`.
* Size it with a width class; the height follows a 20:9 screen.
*/
export function AndroidFrame({
srcs = [],
active = 0,
alt = '',
children,
finish = 'obsidian',
shadow = true,
className = '',
}: {
srcs?: string[];
active?: number;
alt?: string;
children?: ReactNode;
finish?: keyof typeof FINISH;
shadow?: boolean;
className?: string;
}) {
const f = FINISH[finish];
return (
<div className={`relative ${className}`} style={{ aspectRatio: '0.468' }}>
{/* Keys on the right edge: power, then the volume rocker. */}
<span aria-hidden="true" className="absolute right-[-1.6%] top-[21%] h-[7%] w-[1.8%] rounded-r-sm" style={{ background: f.button }} />
<span aria-hidden="true" className="absolute right-[-1.6%] top-[31%] h-[13%] w-[1.8%] rounded-r-sm" style={{ background: f.button }} />
<div
className="absolute inset-0 rounded-[13%/6%] p-[3.2%]"
style={{ background: f.body, boxShadow: `inset 0 0 0 1.5px ${f.edge}${shadow ? ', 0 30px 50px -12px rgb(15 27 45 / 0.35)' : ''}` }}
>
<div className="relative h-full w-full overflow-hidden rounded-[10.5%/4.9%] bg-white">
{srcs.map((s, i) => (
<img key={s} src={s} alt={i === active ? alt : ''} aria-hidden={i !== active} 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-[10%]">{children}</div>}
<span aria-hidden="true" className="absolute left-1/2 top-[2.2%] aspect-square w-[5.5%] -translate-x-1/2 rounded-full bg-black ring-[1.5px] ring-black/40" />
</div>
</div>
</div>
);
}Usage
import { AndroidFrame } from "@/components/site/devices/android-frame"Examples
Live
import { AndroidFrame } from "@/registry/vcare/site/devices/android-frame"
import { InvoiceMini } from "@/registry/vcare/site/minis/invoice-mini"
import { PaymentMini } from "@/registry/vcare/site/minis/payment-mini"
// Live content on the screen: here, a bill and its payment.
export default function SiteAndroidFrameLive() {
return (
<div className="vc-site flex justify-center p-6">
<AndroidFrame className="w-[240px]">
<div className="grid gap-2 bg-[#f4f6f9] p-3">
<p className="text-[13px] font-semibold text-ink">Your bill</p>
<InvoiceMini lines={[["Consultation", "₹500"], ["CBC", "₹350"]]} total="₹850" />
<PaymentMini amount="₹850 paid" detail="UPI · R20411" />
</div>
</AndroidFrame>
</div>
)
}Exports
AndroidFrame
Dependencies
@vcare/site-theme(registry)
Raw item: /r/site-android-frame.json