Skip to content
Eskais UI

Layout

Card

Card parts: a titled card renders as a section labelled by its title, with an eyebrow, a top-end action slot, a heading level on the title and card, dashed or bare surfaces.

Example

Project

Apollo

Last deployed 2 hours ago
Ready

Installation

npx shadcn@latest add @eskais/card
npm packagesclass-variance-authority@0.7.1

Usage

Import
import {  Card,  CardAction,  CardContent,  CardDescription,  CardEyebrow,  CardFooter,  CardHeader,  CardTitle,  cardVariants,} from "@/components/ui/card"import { CardTitleContext, useCardTitleRegistration } from "@/components/ui/use-card-title"

API reference

Card

PropTypeDefault
surface`dashed` is an outlined, unfilled tile, like a "create" placeholder; `none` drops the box and its padding."card" | "none" | "dashed""card"

Also takes <section> attributes and render.

CardHeader

Takes <div> attributes and render.

CardTitle

PropTypeDefault
headingLevelRenders an `h1`–`h6`. Without it the title is a `div` that still names the card.HeadingLevel–

Also takes <div> attributes and render.

Other exports

CardActionCardContentCardDescriptionCardEyebrowCardFootercardVariantsCardTitleContextuseCardTitleRegistrationtype CardPropstype CardSurfacetype CardTitlePropstype CardHeadingLevel

Accessibility

  • A titled card is a section labelled by its title; pass render={<li />} to keep list cards out of the landmarks.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.