Card
The one surface for every in-page card: white, a 1 px border, 8 px corners standing alone and 4 nested, 16 / 12 padding, never a shadow. A clickable card shades on hover and tints its border navy.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
import { Card, CardButton, CardLabel, CardValue } from "@leap-crm/design-system";Playground
Change a prop and the component follows. Its code is under Props.
Card
Pipeline value
$184,250
Props
nested
CardButton
Props
nested
selected
disabled
Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Set nested on a card inside another bordered surface, like a card in a panel: its corners drop from 8 px to 4 px, smaller than its container's. |
| Do | Use CardButton when the whole card opens something, so it is one focus stop with one name instead of a card holding a link. |
| Do | Use one card per record or figure. Its 1 px border separates it from the page; no shadow or fill is needed. |
| Don't | Give a card a shadow or a coloured fill. Put role or status colour in a dot, badge or thin border inside it. |
| Don't | Nest a card inside a card more than one level deep. Use a list or a table for the inner rows. |
Props
Card takes every prop of a <div>. CardButton takes ui-sdk's Button props: onClick, disabled and render (for a card that's a link).
Card
| Prop | Type | Default | Description |
|---|---|---|---|
| nested | boolean | false | Inside another surface, like a card in a panel: 4 px corners instead of 8. |
CardButton
| Prop | Type | Default | Description |
|---|---|---|---|
| nested | boolean | false | Inside another surface, like a card in a panel: 4 px corners instead of 8. |
| selected | boolean | — | Marks the card chosen among others, with a navy border. Sets aria-pressed. |
| children | ReactNode | — | What it shows inside. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
CardLabel
No props of its own.
CardValue
No props of its own.
Code
What the playground shows, ready to copy.
Card
import { Card, CardLabel, CardValue } from "@leap-crm/design-system";
<Card>
<CardLabel>Pipeline value</CardLabel>
<CardValue>$184,250</CardValue>
</Card>CardButton
import { CardButton, CardLabel, CardValue } from "@leap-crm/design-system";
<CardButton onClick={select}>
<CardLabel>Won this month</CardLabel>
<CardValue>$42,600</CardValue>
</CardButton>Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| EnterSpace | Presses a card that does something. |







