A surface container with configurable padding and an optional header (icon + title + an `action` slot).
Examples of v0.6.2 are shown as code; only the latest version runs live. Open the live examples →
Default Card
1const DefaultCard = () => (2 <Card padding="md">Default card with md padding</Card>3);45render(<DefaultCard />);
No Padding Card
1const NoPaddingCard = () => (2 <Card padding="none">Card with no padding</Card>3);45render(<NoPaddingCard />);
Small Padding Card
1const SmallPaddingCard = () => (2 <Card padding="sm">Card with sm padding</Card>3);45render(<SmallPaddingCard />);
Large Padding Card
1const LargePaddingCard = () => (2 <Card padding="lg">Card with lg padding</Card>3);45render(<LargePaddingCard />);
Card With Header
1const CardWithHeader = () => (2 <Card title="Settings" padding="md">3 Card body content4 </Card>5);67render(<CardWithHeader />);
Card With Icon And Action
1const CardWithIconAndAction = () => (2 <Card3 icon="🧩"4 title="Block"5 action={<button onClick={() => {}}>✕</button>}6 padding="md"7 >8 Card body content9 </Card>10);1112render(<CardWithIconAndAction />);
Interactive Card
1const InteractiveCard = () => (2 <Card padding="md" onSelect={() => {}}>3 <span>🧩</span>4 <span>Click me</span>5 </Card>6);78render(<InteractiveCard />);
Card As Page Level Section
1const CardAsPageLevelSection = () => (2 <Card title="Settings" headingLevel={2} padding="md">3 Used directly under a page’s h1, with no intervening section — its4 title takes the h2 slot instead of the h3 default.5 </Card>6);78render(<CardAsPageLevelSection />);