Card
Sizable, themeable cards with a flexible API
- Sizable with a size prop that passes to Card children.
- Themeable helper props like elevate.
- Background component that handles positioning.
Installation
Card is already installed in @hanzo/gui, or you can install it independently:
npm install @hanzogui/cardAnatomy
import { Card } from '@hanzo/gui' // or '@hanzogui/card'
export default () => (
<Card>
<Card.Header />
<Card.Footer />
{/* any other components */}
<Card.Background />
</Card>
)API Reference
Card
Frame of the card, extends ThemeableStack props, adding:
| Prop | Type | Default | Required |
|---|---|---|---|
| size | SizeTokens | - | - |
| unstyled | boolean | - | - |
Card.Header
Extends ThemeableStack, adding:
| Prop | Type | Default | Required |
|---|---|---|---|
| unstyled | boolean | - | - |
Card.Footer
Extends ThemeableStack, adding:
| Prop | Type | Default | Required |
|---|---|---|---|
| unstyled | boolean | - | - |
Card.Background
Extends YStack, set to fullscreen and zIndex below Header/Footer.
| Prop | Type | Default | Required |
|---|---|---|---|
| unstyled | boolean | - | - |
Last updated on