Skip to content
Drivn logoDrivn

Card

Container with dot notation sub-components for preview and info.

Preview

🎨

Card Title

Description text

Installation

npx drivn add card

Usage

1import { Card } from "@/components/ui/card"
2
3export default function Page() {
4 return (
5 <Card>
6 <Card.Preview>
7 <span>Preview content</span>
8 </Card.Preview>
9 <Card.Info>
10 <span>Card title</span>
11 </Card.Info>
12 </Card>
13 )
14}

API Reference

PropTypeDefaultDescription
hoverbooleantrueEnables hover lift effect and background transition
classNamestringAdditional CSS classes to apply
childrenReactNodeCard sub-components (Preview, Info)