Layout
Card
A framed box: a body, a media or preview area with a footer, a card that is one link, a framed grid of cells and a framed list.
The round server
Session, round, recovery and limits, one instance per provider.
Installation
pnpm add @elsikora/keystone-ui-kitUsage
import { Card, CardBody, CardFooter, CardGrid, CardList } from "@elsikora/keystone-ui-kit";import { Card, CardBody } from "@elsikora/keystone-ui-kit";
export default function CardDefaultExample() { return ( <Card className="max-w-md"> <CardBody> <h3 className="text-xl">The round server</h3> <p className="mt-3 text-fg-2">Session, round, recovery and limits, one instance per provider.</p> </CardBody> </Card> );}Examples
Default
The round server
Session, round, recovery and limits, one instance per provider.
Media and footer
CardMedia centres a preview and takes the card's free height; CardFooter is its caption.
Preview
badge.tsx
Link
The whole card is one link: give the router's link to Card with asChild.
Grid
Cells parted by hairlines, as one card; the columns are the caller's.
- 01
Build the math
- 02
Freeze a release
- 03
Upload it
- 04
Activate it
List
Items parted by hairlines, as one card.
- game.jsonThe game's name, mechanic and math release.
- skin/Colours, fonts and the art of the field.
- texts/Every line the player reads, per language.
API reference
Card
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "link" | "default" | link: the border darkens under the pointer. |
asChild | boolean | false | Draws the frame on its one child (a router's link, a figure, a list item). |
className | string | - | More classes, added after the kit's (a width, a place in the grid). |
CardBody
| Prop | Type | Default | Description |
|---|---|---|---|
size | "default" | "sm" | "default" | sm: the tighter padding of a small link card. |
CardFooter
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Draws the footer on its one child (a figcaption). |
CardGrid
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Draws the grid on its one child (an ol). |
CardList
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Draws the list on its one child (an ol). |
Notes
- A front never draws a frame (a rounded corner with a border) on its own element: the frame is the card's.
- A link card is a link, not a button: it goes somewhere. Its text is the link's name, so keep it short.
- Give CardGrid and CardList an ol with asChild when their order means something.