Overview
Style props allow you to:- Apply styles directly to components as props
- Use design tokens for consistent values
- Create responsive designs with arrays
- Avoid writing custom CSS
- Maintain type safety with TypeScript
Available on Box
Most style props are available on the Box component and components built on Box:Layout Props
Display
Control the display type:Width & Height
Set dimensions using size tokens or CSS values:Size
Set both width and height:Overflow
Control overflow behavior:Vertical Align
Spacing Props
Padding
Apply internal spacing:Margin
Apply external spacing:Gap
Space flex or grid children:Background Props
Background Color
Background Image
Background Shorthand
Border Props
Border Width
Border Style
Border Color
Border Radius
Border Shorthand
Typography Props
Font Family
Font Size
Font Weight
Line Height
Text Align
Text Transform
Text Decoration
Text Color
Available on Text component:Flexbox Props
When usingdisplay="flex":
Flex Direction
Flex Wrap
Justify Content
Align Items
Align Content
Align Self
Flex Properties
Grid Props
When usingdisplay="grid":
Grid Template
Grid Gap
Grid Auto
Grid Item Placement
Position Props
Position Type
Position Values
Z-Index
Shadow Props
Other Props
Cursor
Opacity
Transition
Responsive Style Props
Use arrays to apply different values at different breakpoints:Custom Breakpoints
Define custom breakpoints in your theme:Pseudo-Class Props
Some components support pseudo-class props:Combining Props
Style props work together naturally:TypeScript Support
Style props are fully typed:Best Practices
Use Design Tokens
Leverage Responsive Arrays
Compose Styles Logically
Prefer Style Props Over CSS
Next Steps
- Explore Design Tokens for available values
- Learn about Custom Components using style props
- Review Box component documentation
- Try the Theme Designer to experiment with tokens