Card
A raised surface that groups related content.
A card has a header (title, description and an optional action), a body and a footer, all
optional. size="sm" tightens its spacing for dense panels.
Dependencies
What it's built from and what's built from it in Base, read from the imports in its source.
| Uses | Textprimitive |
|---|---|
| Used by | Nothing yet. |
| Packages | @ui-sdk/core@0.1.0-beta.20@ui-sdk/react@0.1.0-beta.20 |
Installation
Set the project up for Base once first, as Getting started shows. Then add it with the CLI, or by hand.
With the CLI
Manually
Install its packages:
Add the components it uses first, listed under Dependencies.
Then copy the source:
API reference
Generated from Base's types. Props marked ours are added here; the rest come from the ui-sdk part it wraps. Every part also accepts its element's native attributes.
Card
A raised surface grouping related content, with an optional header, body and footer.
- renderours
The element to render instead of a
<div>. Give it<a href="…" />to make the whole card a link.Type RenderProp
- sizeours
Padding and gaps.
smsuits dense panels.Type "sm" | "md" · Default md
CardAction
A control in the header's top-right corner.
Takes the props of a native div.
CardContent
The card's body.
Takes the props of a native div.
CardDescription
A line under the title.
Takes the props of a native div.
CardFooter
Actions or notes at the bottom of the card.
Takes the props of a native div.
CardHeader
The card's title, description and an optional action beside them.
Takes the props of a native div.
CardTitle
Names the card.
Takes the props of a native div.