Card
Versatile content container with header, body, footer, and optional cover — in five visual variants and both vertical and horizontal orientations.
Basic Usage
Basic Card
Card with title, subtitle, actions, and footer.
import { Card, Button } from 'fluxo-ui';
<Card
title="Project Atlas"
subtitle="Updated 2 hours ago"
actions={<Button label="Open" size="xs" variant="primary" />}
footer={<Button label="View details" size="sm" layout="plain" />}
>
Redesign of the main dashboard with improved analytics and deeper drill-downs.
</Card>Variants
Variants
Five visual styles.
<Card variant="elevated" title="Elevated">...</Card>
<Card variant="outlined" title="Outlined">...</Card>
<Card variant="filled" title="Filled">...</Card>
<Card variant="ghost" title="Ghost">...</Card>
<Card variant="interactive" title="Interactive" onClick={() => {}}>...</Card>Cover & Orientation
With Cover Media & Orientation
Vertical and horizontal layouts with a cover slot.
<Card
variant="elevated"
padding="md"
cover={<img src="..." alt="" />}
title="Aurora Peak"
subtitle="Iceland — 2024"
actions={<Button label="Save" size="xs" variant="primary" />}
>
Seven day hike across the northern ridge.
</Card>Import
import { Card } from 'fluxo-ui';
import type { CardProps, CardVariant } from 'fluxo-ui';Props
variant'elevated' | 'outlined' | 'filled' | 'ghost' | 'interactive'"'outlined'"Visual style.
variant'elevated' | 'outlined' | 'filled' | 'ghost' | 'interactive'"'outlined'"Visual style.
padding'none' | 'sm' | 'md' | 'lg'"'md'"Body padding preset.
padding'none' | 'sm' | 'md' | 'lg'"'md'"Body padding preset.
orientation'vertical' | 'horizontal'"'vertical'"Layout direction (horizontal puts cover on the left).
orientation'vertical' | 'horizontal'"'vertical'"Layout direction (horizontal puts cover on the left).
size'sm' | 'md' | 'lg'"'md'"Overall size preset.
size'sm' | 'md' | 'lg'"'md'"Overall size preset.
titleReactNodeHeader title.
titleReactNodeHeader title.
subtitleReactNodeHeader subtitle.
subtitleReactNodeHeader subtitle.
actionsReactNodeHeader right-side actions (usually buttons).
actionsReactNodeHeader right-side actions (usually buttons).
coverReactNodeTop (or left) media slot.
coverReactNodeTop (or left) media slot.
footerReactNodeFooter area.
footerReactNodeFooter area.
loadingboolean"false"Show shimmer overlay.
loadingboolean"false"Show shimmer overlay.
as'div' | 'a' | 'button'Render as a different element.
as'div' | 'a' | 'button'Render as a different element.
hrefstringWhen set, card renders as a link.
hrefstringWhen set, card renders as a link.
onClick(e) => voidClick handler (makes the card interactive).
onClick(e) => voidClick handler (makes the card interactive).