Skip to content

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

Terminal
pnpm add @elsikora/keystone-ui-kit

Usage

Import
import { Card, CardBody, CardFooter, CardGrid, CardList } from "@elsikora/keystone-ui-kit";
docs/card/default.example.tsx
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

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.

  1. 01

    Build the math

  2. 02

    Freeze a release

  3. 03

    Upload it

  4. 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

PropTypeDefaultDescription
variant"default" | "link""default"link: the border darkens under the pointer.
asChildbooleanfalseDraws the frame on its one child (a router's link, a figure, a list item).
classNamestring-More classes, added after the kit's (a width, a place in the grid).

CardBody

PropTypeDefaultDescription
size"default" | "sm""default"sm: the tighter padding of a small link card.

CardFooter

PropTypeDefaultDescription
asChildbooleanfalseDraws the footer on its one child (a figcaption).

CardGrid

PropTypeDefaultDescription
asChildbooleanfalseDraws the grid on its one child (an ol).

CardList

PropTypeDefaultDescription
asChildbooleanfalseDraws 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.