Card
A surface that groups related content into one block. Use to separate one item from the rest of the page.
Health
Source
Design
Storybook
Playground
No Example
Accessibility
compliant
Platform
Web
- Overview
- Props
- Figma
Content A
Content B
When to use
- Reserve cards for interactive blocks. Cards (shadows, light grey backgrounds) suggest affordance. Use them for clickable or interactive blocks; avoid card styling for static content so that interactive elements stay meaningful.
- Avoid over-boxing. If everything is in a box, alerts and important messages don’t stand out and hierarchy is lost. Prefer hierarchy via typography, spacing, and layout.
- Prefer whitespace and grid. Use ample whitespace and grid/columns instead of wrapping every block in a card. Use clear titles or overlines to convey structure; avoid adding a box just to group content.
- Split dense views. If everything looks equally important, consider more pages or steps so users can focus. A few intentional steps can be clearer than one dense, over-boxed screen.
Playground
Loading...
Card props
| Name | Type | Default Value | Description | Usage count |
|---|---|---|---|---|
| alignment | Alignmentundefined | How children are aligned in the parent Frame. - `stretch` props make children without fixed dimensions to stretch to the size of the parent in the orthogonal direction (horizontal for `column`, vertical for `row`) - ⚠️ Alignment `top-left` doesn't work under `ScrollView`. Please use `top-stretch` instead. (see [this](https://github.com/facebook/react-native/issues/31555)) | ||
| backgroundColor | 94 possibilities"transparent""action""pink500""pink700""pink900""grey200""grey500""grey600""blue700""grey50""grey100""grey200HighContrast""grey300""grey400""grey600HighContrast""grey700""grey800""grey900""blue50""blue100""blue300""blue500""blue900""teal50""teal100""teal300""teal500""teal700""teal900""pink50""pink100""pink300""pink500HighContrast""pink700HighContrast""pink900HighContrast""yellow50""yellow100""yellow300""yellow500""yellow700""whiteAlpha100""whiteAlpha300""whiteAlpha400""whiteAlpha500""whiteAlpha600""whiteAlpha700""whiteAlpha800""whiteAlpha900""white""black""fluoYellow""cream""lightCream""action50""action100""action300""action500""action700""action900""positive""positive50""positive100""positive300""positive500""positive700""positive900""warning""warning50""warning100""warning300""warning500""warning500HighContrast""warning700""warning700HighContrast""warning900""warning900HighContrast""negative""negative50""negative100""negative300""negative500""negative500HighContrast""negative700""negative700HighContrast""negative900""negative900HighContrast""blue""pink""brand""grey""facebook""twitter""linkedin"undefined | |||
| borderColor | 94 possibilities"transparent""action""pink500""pink700""pink900""grey200""grey500""grey600""blue700""grey50""grey100""grey200HighContrast""grey300""grey400""grey600HighContrast""grey700""grey800""grey900""blue50""blue100""blue300""blue500""blue900""teal50""teal100""teal300""teal500""teal700""teal900""pink50""pink100""pink300""pink500HighContrast""pink700HighContrast""pink900HighContrast""yellow50""yellow100""yellow300""yellow500""yellow700""whiteAlpha100""whiteAlpha300""whiteAlpha400""whiteAlpha500""whiteAlpha600""whiteAlpha700""whiteAlpha800""whiteAlpha900""white""black""fluoYellow""cream""lightCream""action50""action100""action300""action500""action700""action900""positive""positive50""positive100""positive300""positive500""positive700""positive900""warning""warning50""warning100""warning300""warning500""warning500HighContrast""warning700""warning700HighContrast""warning900""warning900HighContrast""negative""negative50""negative100""negative300""negative500""negative500HighContrast""negative700""negative700HighContrast""negative900""negative900HighContrast""blue""pink""brand""grey""facebook""twitter""linkedin"undefined | |||
| borderRadius | 11 possibilities"size20""size24""size32""size40""size48""size12""size16""size4""size8""sizeInfinite"undefined | |||
| borderType | "none""dashed""solid"undefined | |||
| borderWidth | numberundefined | |||
| direction | Directionundefined | |||
| disabled | booleanundefined | |||
| distribution | Distributionundefined | |||
| gapInBaseNumber | numberundefined | Gap between elements within a Frame. | ||
| height | Sizingundefined | Specify `fill` for a full-width, `hug` to adapt width to content, or any fixed `number` (in px) Don't fill this prop to let flexbox handle it | ||
| hideDown | 8 possibilities"xs""vs""sm""md""lg""xl""xxl"undefined | |||
| hideUp | 8 possibilities"xs""vs""sm""md""lg""xl""xxl"undefined | |||
| marginInBaseNumber | PaddingOrMarginundefined | Pass a ```number``` for uniform margin or a Margin object ```{horizontal:? number, vertical: number}``` for symmetric margin. | ||
| overflowX | OverflowXundefined | |||
| overflowY | OverflowYundefined | |||
| paddingInBaseNumber | PaddingOrMarginundefined | Pass a ```number``` for uniform padding or a Padding object ```{horizontal:? number, vertical: number}``` for symmetric padding. | ||
| parentFrameDirection | Directionundefined | |||
| selected | booleanundefined | |||
| shadow | "xs""sm""md""lg"undefined | sm | ||
| size | CardSizeundefined | sm | Border radius size of the card | |
| width | Sizingundefined | Specify `fill` for a full-width, `hug` to adapt width to content, or any fixed `number` (in px) Don't fill this prop to let flexbox handle it |
Deprecated props
| Name | Type | Default Value | Description | Usage count |
|---|---|---|---|---|
| gap | numberundefined | use gapInBaseNumber instead | ||
| margin | PaddingOrMarginundefined | use marginInBaseNumber instead | ||
| padding | PaddingOrMarginundefined | use paddingInBaseNumber instead |
Undocumented props
| Name | Type | Default Value | Description | Usage count |
|---|---|---|---|---|
| className | any | |||
| css | any | |||
| data-testid | any | |||
| id | any | |||
| onClick | any | |||
| style | any |