Title
Anatomy
Anatomy
import {Card} from '@staffbase/design';
<Card />API reference
Card
| Name | Type | Description |
|---|---|---|
children | ReactNode | The content of the card. |
When to use
When not to use
How to use
Structure
Get Inspired
Highlights from the last 7 days.
Published
Scheduled
Draft
Padding
16px padding
Compact cards, dense lists, and small widgets.
24px padding
Content-heavy cards and primary page sections.
Layout & spacing
Get Inspired
Content that performed well this week.
Tasks
Comments and mentions waiting for a reply.
Nested elements
Do
6px radius
Nested surface with a 6px radius inside the 8px card.
Don't
8px radius
Nested surface with the same 8px radius as the card.
Background
Do
Insights from the last 7 days
Card on the neutral base page background.
Don't
Insights from the last 7 days
Card on a neutral surface background, where it blends in.
Styling
Do
Insights from the last 7 days
Default card styling: neutral border, surface background, 8px radius.
Don't
Insights from the last 7 days
Added shadow and a heavier custom border.