Card
Stable"use client" at the top to make it work.A practical container component for grouping related content with different styling options.
Import
import { Card, CardHeader, CardTitle, CardDescription, CardBody, CardFooter } from "laxod";Basic Usage
The simplest card with just content inside.
Basic Card
Card Title
This is a basic card with a title and description.
Card content goes here. You can put any content inside the card body.
Variants
Cards come in different visual styles to fit your needs.
Card Variants
Default
Standard card
Fancy
Card with moving border glow effect
Outlined
Card with border
Flat
Minimal card with no border
Padding
Control the amount of internal spacing with the padding prop.
Card Padding
No padding
Small padding
Medium padding (default)
Large padding
Interactive Cards
Cards can be made clickable by passing an onClick handler.
Setting the interactive prop adds the pointer cursor.
Interactive Card
Click Me!
This card is interactive and responds to clicks.
Times clicked: 0
Card with Footer
Use CardFooter to add action buttons or additional information.
Card with Actions
Complete Your Profile
Add more information to enhance your account.
Your profile is 60% complete. Add a profile picture and bio to finish.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | Content to display in the card |
| variant | "default" | "fancy" | "outlined" | "flat" | "default" | Visual style of the card |
| padding | "none" | "sm" | "md" | "lg" | "md" | Internal spacing of the card |
| interactive | boolean | false | Enable hover effects and cursor pointer |
| onClick | (e: MouseEvent) => void | - | Click handler (automatically makes card interactive) |
| className | string | "" | Additional CSS classes to apply |
Subcomponents
Card comes with several subcomponents for structured layouts.
| Component | Description |
|---|---|
| CardHeader | Container for card title and description |
| CardTitle | Main heading for the card |
| CardDescription | Subtitle or supporting text |
| CardBody | Main content area of the card |
| CardFooter | Footer section for actions or metadata |