Card
Compose Card with Card.Header, Card.Title, Card.Description, Card.Body,
and Card.Footer.
import { Badge, Button, Card } from '@manti-ui/react'; export default function CardBasic() { return ( <Card className="w-full max-w-[calc(var(--manti-space-16)*5)]"> <Card.Header> <div className="flex justify-between items-center"> <Card.Title>Kayseri Mantısı</Card.Title> <Badge variant="primary" dot> Fresh </Badge> </div> <Card.Description> Tiny dumplings, garlic yogurt, paprika butter. </Card.Description> </Card.Header> <Card.Body> Hand-folded four-corner parcels, simmered until tender and finished with a smooth drizzle of warm chili oil. </Card.Body> <Card.Footer> <Button size="sm">Cook now</Button> <Button size="sm" variant="tertiary"> Save </Button> </Card.Footer> </Card> ); }
Elevated and interactive
elevated strengthens the surface tint. interactive adds hover and focus
movement; pair it with real link or button semantics.
Default
A bordered resting surface.
Elevated
Raised with a stronger surface tint.
Interactive
Lifts smoothly on hover and focus.
API
| Prop | Type | Default | Description |
|---|---|---|---|
elevated | boolean | false | Strengthen the card surface tint. |
interactive | boolean | false | Apply the smooth hover lift. Pair with real semantics. |
as | ElementType | 'div' | Polymorphic semantic root such as article, aside, or li. |
Styling
Anatomy
| Part | Selector | Description |
|---|---|---|
root | [data-scope="card"][data-part="root"] | The signature pillowy surface. |
header | [data-scope="card"][data-part="header"] | Card.Header — title + description region. |
title | [data-scope="card"][data-part="title"] | Card.Title — the heading. |
description | [data-scope="card"][data-part="description"] | Card.Description — supporting copy. |
body | [data-scope="card"][data-part="body"] | Card.Body — main content. |
footer | [data-scope="card"][data-part="footer"] | Card.Footer — actions / meta. |
Tokens
| Token | Controls |
|---|---|
--manti-card-radius | radius |
--manti-card-padding-x | padding x |
--manti-card-padding-y | padding y |
Last updated