Components
Card
A glassmorphic surface with hover lift, soft shadow, and an ambient glow.
Installation
$npx litefy@latest add card
$pnpm dlx litefy@latest add card
$yarn dlx litefy@latest add card
$bun --bun litefy@latest add card
Usage
A simple card with title, description, and actions.
Litefy Card
A glassmorphic surface with subtle border, soft shadow and a glow that fades in on hover.
import { Card } from "@/ui";
export default function CardBasicDemo() {
return (
<Card className="w-full max-w-sm p-6">
<h3 className="text-lg font-semibold">Litefy Card</h3>
<p className="text-muted-foreground mt-2 text-sm">
A glassmorphic surface with subtle border, soft shadow and a glow that
fades in on hover.
</p>
<div className="mt-4 flex gap-2">
<button
type="button"
className="rounded-md bg-primary px-3 py-1.5 text-sm text-primary-foreground"
>
Action
</button>
<button type="button" className="rounded-md border px-3 py-1.5 text-sm">
Cancel
</button>
</div>
</Card>
);
}
Group
Compose multiple Card elements into a responsive grid layout.
Revenue
$12,480
+12.4% from last week
Active users
3,219
+5.1% from last week
import { Card } from "@/ui";
export default function CardGroupDemo() {
return (
<div className="grid w-full max-w-2xl grid-cols-1 gap-4 sm:grid-cols-2">
<Card className="p-5">
<div className="text-muted-foreground text-xs uppercase tracking-wider">
Revenue
</div>
<div className="mt-2 text-2xl font-semibold">$12,480</div>
<div className="text-muted-foreground mt-1 text-xs">
+12.4% from last week
</div>
</Card>
<Card className="p-5">
<div className="text-muted-foreground text-xs uppercase tracking-wider">
Active users
</div>
<div className="mt-2 text-2xl font-semibold">3,219</div>
<div className="text-muted-foreground mt-1 text-xs">
+5.1% from last week
</div>
</Card>
</div>
);
}
API Reference
Card
A glassmorphic surface with hover lift, soft shadow, and an ambient glow that fades in on hover. The glow is a static radial-gradient overlay anchored at the top-left corner (at 25% 25%) and tinted from-primary/15 — it follows the theme's primary color and is not customizable via a CSS variable.
| Prop | Type | Default | Description |
|---|---|---|---|
className | ClassNameValue | - | Custom CSS class |
...props | React.ComponentProps<"div"> | - | Supports all native div props |