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
Tint card
A tinted feature card: a soft product colour, an icon chip, a title and a sentence, with a footer (a panel or a quote) that slides up on hover. Lays out in a six-column bento grid.
import { LuFlaskConical, LuPill, LuStethoscope } from "react-icons/lu"
import { TintCard } from "@/registry/vcare/site/components/tint-card"
import { FeedbackPanel } from "@/registry/vcare/site/components/feedback-panel"
import { InvoiceMini } from "@/registry/vcare/site/minis/invoice-mini"
export default function SiteTintCardDemo() {
return (
<div className="vc-site grid gap-5 p-4 md:grid-cols-6">
<TintCard
span="md:col-span-3"
tint="visit"
icon={LuStethoscope}
label="Doctors"
title="Order a test without leaving the visit."
footer={<FeedbackPanel who="Doctors" color="var(--visit)">Ordering a test meant a second trip through another screen.</FeedbackPanel>}
>
Notes, orders and prescriptions sit on one visit.
</TintCard>
<TintCard span="md:col-span-3" tint="rx" icon={LuPill} label="Pharmacy" title="Bill and dispense in one step." index={1} footer={<InvoiceMini />}>
Stock goes out earliest expiry first, and the bill is ready when the medicines are.
</TintCard>
<TintCard span="md:col-span-6" tint="labs" icon={LuFlaskConical} label="Lab" title="A card with no footer." index={2}>
Leave out the footer for a plain feature card.
</TintCard>
</div>
)
}Installation
npx shadcn@latest add @vcare/site-tint-cardOr install directly from the URL: https://ui.vcarehms.com/r/site-tint-card.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/components/tint-card.tsx
import type { ReactNode } from 'react';
import type { IconType } from 'react-icons';
import { Reveal } from '../ui/Reveal';
/** Product tints from the website theme, as [soft background, strong colour]. Any CSS colours work too. */
export const TINTS = {
vcare: ['var(--vcare-soft)', 'var(--vcare)'],
visit: ['var(--visit-soft)', 'var(--visit)'],
rx: ['var(--rx-soft)', 'var(--rx)'],
labs: ['var(--labs-soft)', 'var(--labs)'],
active360: ['var(--active360-soft)', 'var(--active360)'],
brain: ['var(--brain-soft)', 'var(--brain)'],
amber: ['#fff3d6', '#b45309'],
} as const;
export type Tint = keyof typeof TINTS;
/**
* The tinted feature card from the Departments and Co-designed sections: a soft gradient, a chip with an icon and label, a title,
* a sentence, and a footer (a product panel, a quote) that slides up when the card is hovered. Put cards in a
* `grid md:grid-cols-6` and give each a `span` (md:col-span-2 for thirds, md:col-span-3 for halves).
*/
export function TintCard({
label,
icon: Icon,
title,
children,
footer,
tint = 'vcare',
bleed = false,
span = '',
index = 0,
className = '',
}: {
label: string;
icon?: IconType;
title: ReactNode;
/** The sentence under the title. */
children?: ReactNode;
/** Shown at the bottom of the card, e.g. a panel or a FeedbackPanel. */
footer?: ReactNode;
tint?: Tint | readonly [string, string];
/** Let the footer run off the bottom edge (the Departments panels do). */
bleed?: boolean;
/** Grid span classes, e.g. "md:col-span-3". */
span?: string;
/** Position in the grid, to stagger the reveal. */
index?: number;
className?: string;
}) {
const [soft, color] = typeof tint === 'string' ? TINTS[tint] : tint;
return (
<Reveal
as="article"
delay={(index % 3) * 0.07}
className={`group relative flex flex-col overflow-hidden rounded-[32px] transition-all duration-500 hover:-translate-y-1 hover:shadow-[var(--shadow-lift)] ${span} ${className}`}
>
<div className="absolute inset-0 -z-10" style={{ background: `linear-gradient(180deg, ${soft} 0%, color-mix(in srgb, ${soft} 40%, white) 100%)` }} />
<div className="px-7 pt-7">
<span className="chip bg-white/80 shadow-[0_0_0_1px_rgb(22_24_29/0.06)]" style={{ color }}>
{Icon && <Icon size={14} aria-hidden="true" />} {label}
</span>
<h3 className="mt-3 h-card">{title}</h3>
{children && <p className="mt-2 text-[14.5px] leading-relaxed text-(--body)/75">{children}</p>}
</div>
{footer && (
<div className={`mt-auto px-6 pt-6 ${bleed ? '' : 'pb-6'}`}>
<div className={`${bleed ? 'translate-y-3' : 'translate-y-1'} transition-transform duration-500 ease-out group-hover:translate-y-0`}>{footer}</div>
</div>
)}
</Reveal>
);
}Usage
import { TINTS, TintCard } from "@/components/site/components/tint-card"Examples
Tints
import { LuSparkles } from "react-icons/lu"
import { TintCard, TINTS, type Tint } from "@/registry/vcare/site/components/tint-card"
export default function SiteTintCardTints() {
return (
<div className="vc-site grid gap-4 p-4 sm:grid-cols-2 lg:grid-cols-4">
{(Object.keys(TINTS) as Tint[]).map((t, i) => (
<TintCard key={t} tint={t} icon={LuSparkles} label={t} title="Tint" index={i}>
{TINTS[t][0]}
</TintCard>
))}
</div>
)
}Exports
TINTS, TintCard
Dependencies
react-icons@^5.7.0(npm)@vcare/site-kit(registry)@vcare/site-theme(registry)
Raw item: /r/site-tint-card.json