Layout
Card
A raised surface with a header, content and a footer: settings groups, dashboard tiles.
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from 'omuk-ui/card';Layout
A raised surface with a header, content and a footer: settings groups, dashboard tiles.
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from 'omuk-ui/card';Change the props on the right. The card and its code follow.
import { Button } from 'omuk-ui/button';
import {
Card,
CardAction,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
} from 'omuk-ui/card';
<Card className="w-full max-w-md">
<CardHeader>
<CardTitle>Monthly report</CardTitle>
<CardDescription>Sent to the team on the first of each month.</CardDescription>
<CardAction>Weekly</CardAction>
</CardHeader>
<CardContent className="text-muted">The next report goes out on 1 December, at 09:00.</CardContent>
<CardFooter className="justify-end gap-2 border-t">
<Button variant="ghost">Skip</Button>
<Button>Send now</Button>
</CardFooter>
</Card>A settings group: the title and what it changes, the field, and the actions. A footer with border-t keeps a gap to its line.
CardAction puts something small at the header’s right end: a period, a menu button. The value is large, with tabular digits; the change says in words what it is compared with.
Card holds CardHeader (with CardTitle, CardDescription and CardAction), CardContent and CardFooter. Each takes every prop of a <div>.