Basel Standard

Basel Standard / Docs

Card

Surface primitive that keeps standard card imports while adding stronger editorial rhythm.

Card

Editorial surface with standard imports.

Keep familiar shadcn card imports while adding more expressive subcomponents.

A landing page, docs page, or product shelf can all reuse the same underlying card rhythm.

Cards are the system's repeatable surface primitive. They provide edge, spacing, and typographic hierarchy for places where content needs to feel grouped and intentional, whether that content is editorial copy, product metadata, or a compact utility workflow.

Installation

Install
Purchase access, then open /account/install to issue a registry token.

Usage

import { Card, CardHeader, CardTitle, CardDescription } from "@/components/ui/card"
<Card>
  <CardHeader>
    <CardTitle>System Surface</CardTitle>
    <CardDescription>Structure before decoration.</CardDescription>
  </CardHeader>
</Card>

Why This Primitive Exists

The Swiss card keeps the familiar shadcn import story, but it adds a stricter content rhythm so cards can scale from plain utility panels to more art-directed shelves.

  • Use a card when a section needs a visible frame and repeatable internal spacing.
  • Reach for card subcomponents before hand-rolling local title, meta, and footer patterns.
  • Change variant or tone to fit the surface, not to compensate for weak content hierarchy.

Examples

Variant Overview

The base card works well for standard UI, while the repo-specific variants tune the surface for denser data panels, editorial modules, or action-driven utilities.

Default

Neutral surface for standard product UI.

Use when the card should inherit the page rhythm.

Works well for settings, docs modules, and dashboard summaries.

Data

Quieter panel for denser operational views.

Lets nested metrics and filters read clearly.

Coverage92%
UpdatedToday

Action

Utility card for prompts and next-step decisions.

Useful when buttons and metadata live together.

VariantUse it for
defaultGeneral-purpose docs, settings, and neutral product surfaces.
editorialStory-led cards where typography and spacing should feel more authored.
dataDenser dashboards or metrics panels that need lower visual temperature.
formInput-heavy sections that need structure around a task.
mediaCards with a dedicated media rail or image region.
actionPrompt cards where the footer or CTA cluster is the main outcome.

Composition With Media And Actions

The exported subcomponents are meant to be combined. CardMedia, CardPrice, and CardActions let a product or launch card stay within the same primitive instead of branching into a separate bespoke layout.

Product frame
Grid Chair

Commerce composition

Cards can carry media, pricing, and actions.

This keeps the same primitive usable on a catalog shelf without inventing a separate surface language.

Walnut2026 release
$420
import {
  Card,
  CardActions,
  CardContent,
  CardHeader,
  CardMedia,
  CardPrice,
  CardTitle,
} from "@/components/ui/card"
import { Button } from "@/components/ui/button"

<Card variant="media">
  <CardMedia />
  <CardHeader>
    <CardTitle>Grid Chair</CardTitle>
  </CardHeader>
  <CardContent>
    <CardPrice>$420</CardPrice>
    <CardActions>
      <Button>Add to cart</Button>
      <Button variant="outline">See details</Button>
    </CardActions>
  </CardContent>
</Card>

In Context

Cards become more useful when they show relationship, not just isolation. Pair an editorial summary card with a quieter supporting panel so adjacent content can share the same visual grammar without feeling duplicated.

Launch note

Cards help separate narrative, actions, and supporting data.

The same title rhythm can hold a story summary while the footer collects the next actions.

Use the card when a section needs a visible edge and repeatable internal spacing, not when content can live directly on the page.

Supporting metrics

Adjacent cards can stay related without matching exactly.
Readers retained68%
CTA clicks1.8k
Live surfaces3
<Card variant="data" tone="hero">
  <CardHeader>
    <CardTitle>Supporting metrics</CardTitle>
  </CardHeader>
  <CardContent>{/* compact metrics or filters */}</CardContent>
</Card>

Guidance

Start With Content Structure

  • Use CardHeader for identity, not just decoration.
  • Keep CardTitle short enough to hold an intentional line length.
  • Put metadata in CardMeta or CardEyebrow so the title can stay focused on the main idea.

Choose Variant Before Tone

  • Pick variant based on the kind of surface you are building.
  • Use tone="quiet" or tone="hero" as a secondary adjustment after the structure is right.
  • Reserve tone="inverse" for genuinely dark or image-heavy environments.

Prefer Reuse Over One-Off Layouts

  • If a card needs pricing, actions, or media, use the exported slots before creating a custom wrapper.
  • Keep footer actions concise; a card is a container, not a full page.
  • When content can sit directly on the page without losing clarity, skip the card entirely.

API Reference

Card

The root Card component renders a div and accepts standard React.ComponentProps<"div"> plus the shared surface variants below.

PropTypeDefault
variant"default" | "editorial" | "data" | "form" | "media" | "action""default"
tone"default" | "quiet" | "hero" | "inverse""default"

Exported Slots

Use the slot components to keep hierarchy consistent instead of re-creating local typography rules.

ExportRendersNotes
CardHeaderdivTop section with the default card divider and padding.
CardTitledivUppercase headline with a constrained line length.
CardDescriptionpSupporting copy for the main card idea.
CardEyebrowpSmall uppercase label for category or state.
CardMetadivCompact metadata row for tags, dates, or attributes.
CardContentdivMain body area for copy, lists, or controls.
CardFooterdivBottom action rail with the default divider.
CardActiondivSmall action cluster usually placed inside the header.
CardActionsdivFlexible button row inside content sections.
CardPricedivLarge price or numeric emphasis.
CardMediadivFramed media area with an aspect ratio and border.