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
Patterns
Print Card
Cards for print and other main actions, with one big button.
import { Printer, Receipt } from "lucide-react"
import { Button } from "@/registry/vcare/ui/button"
import { ActionCard, BIG_ACTION, PrintCard } from "@/registry/vcare/ui/print-card"
export default function PrintCardDemo() {
return (
<div className="grid w-full max-w-xl gap-3 sm:grid-cols-2">
<PrintCard title="Sample labels" hint="2 tests · 3 tubes" label="Print labels" onPrint={() => undefined} />
<ActionCard icon={<Receipt className="size-5" />} title="Bill" hint="₹1,250 due">
<Button className={BIG_ACTION}><Printer /> Collect and print</Button>
</ActionCard>
</div>
)
}Installation
npx shadcn@latest add @vcare/print-cardOr install directly from the URL: https://ui.vcarehms.com/r/print-card.json
- Install the dependencies:
npm i lucide-react - Add the registry items it uses: button, utils.
- Copy this file into your project and change the
@/registry/vcare/…imports to your own paths.
components/ui/print-card.tsx
import type { ReactNode } from 'react';
import { Printer } from 'lucide-react';
import { Button } from '@/registry/vcare/ui/button';
import { cn } from '@/registry/vcare/lib/utils';
/** Classes that make a button the big, full-width main action inside an ActionCard. */
export const BIG_ACTION = "h-12 w-full text-[15px] [&_svg:not([class*='size-'])]:size-5";
/**
* The next important step of a page, shown big where the eye lands first (top of the side column, or above the content
* when `row`). The same action also stays in the page header. `children` are the buttons; use BIG_ACTION on them.
*/
export function ActionCard({
icon,
title,
hint,
children,
row,
className,
}: {
icon: ReactNode;
title: ReactNode;
hint?: ReactNode;
children: ReactNode;
/** Lay out text and button side by side on wide screens (for a card that spans the page). */
row?: boolean;
className?: string;
}) {
return (
<section
className={cn(
'gap-3 rounded-3xl bg-card p-5 shadow-border ring-1 ring-primary/25 print:hidden',
row ? 'flex flex-col sm:flex-row sm:items-center' : 'flex flex-col',
className,
)}
>
<div className={cn('flex min-w-0 items-start gap-3', row && 'sm:flex-1 sm:items-center')}>
<span className="grid size-10 shrink-0 place-items-center rounded-2xl bg-primary/10 text-primary dark:bg-primary/25 dark:text-foreground [&_svg]:size-5">
{icon}
</span>
<div className="min-w-0">
<h3 className="font-semibold">{title}</h3>
{hint && <p className="text-sm text-muted-foreground">{hint}</p>}
</div>
</div>
<div className={cn('flex flex-col gap-2', row && 'sm:w-64 sm:shrink-0')}>{children}</div>
</section>
);
}
/** The main print action of a case page. */
export function PrintCard({ title, hint, label, onPrint }: { title: string; hint?: ReactNode; label: string; onPrint: () => void }) {
return (
<ActionCard icon={<Printer />} title={title} hint={hint}>
<Button size="lg" className={BIG_ACTION} onClick={onPrint}>
<Printer />
{label}
</Button>
</ActionCard>
);
}Usage
import { BIG_ACTION, ActionCard, PrintCard } from "@/components/ui/print-card"Exports
BIG_ACTION, ActionCard, PrintCard
Dependencies
lucide-react@^1.80.0(npm)@vcare/button(registry)@vcare/utils(registry)
Raw item: /r/print-card.json