Card
Cards are elevated containers of content, and are used in a variety of contexts. Card shares many of the utility props of <Box/>
.
Simple Card
Card with no inset
Title
Card with Title
Title
Card with Title and Action
Margin and Padding
This components mimics the Box component from our web design system for margin and padding. Margin and padding can be controlled in any direction, using shorthand utility props like padding
, for padding in all directions, paddingX
for horizontal padding, or paddingLeft
for padding left. Margin follows the same rules.
Hello!
The valid tokens for these props come from 'spacing'.
Token | Value | x8 multiplier |
---|---|---|
"none" | 0 | 0x |
"xsmall" | 4 | 0.5x |
"small" | 8 | 1x |
"medium" | 12 | 1.5x |
"large" | 16 | 2x |
"xlarge" | 24 | 3x |
"xxlarge" | 32 | 4x |
"xxxlarge" | 40 | 5x |
"6x" | 48 | 6x |
"7x" | 56 | 7x |
"8x" | 64 | 8x |
"9x" | 72 | 9x |
"10x" | 80 | 10x |
All Props
children
node
required
margin
custom
marginBottom
custom
marginLeft
custom
marginRight
custom
marginTop
custom
marginX
custom
marginY
custom
padding
custom
"large"
paddingBottom
custom
paddingLeft
custom
paddingRight
custom
paddingTop
custom
paddingX
custom
paddingY
custom
onButtonPress
func
rounding
enum
"medium"
style
object │ undefined
title
string
innerStyle
object │ undefined