Skip to content

Card

A bordered surface with header, content and footer parts.

On this page
Used for
  • Run summaries
  • Settings groups
  • Plan tiles
  • Agent profiles

Examples

Installation

npx knowns-ui@latest add card
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

Card
div attributes
Rounded surface with a hairline border.
CardHeader / CardContent / CardFooter
div attributes
Padded parts; the footer sits on a muted strip.
CardTitle / CardDescription
heading / paragraph attributes
Title and muted supporting text.

What it handles

  1. 01Draws a bordered surface with a 16px radius, the card colours and a light shadow.
  2. 02Splits the surface into CardHeader, CardContent and CardFooter, each with its own padding.
  3. 03Sets a CardTitle as an h3 and a CardDescription as a muted paragraph inside the header.
  4. 04Tints the footer with a muted background and a top border so actions read as a separate row.
  5. 05Passes every div attribute and `className` through, so a part can carry a handler, an id or a layout class.
  6. 06Stays plain markup with no state and no script, so it renders on the server.

States

Any change
It updates at once
none
Hover or focus
Nothing moves; the card is not interactive
none
Theme change
The card colours follow the theme tokens
none

Works with

When to use

When to use

  • Grouping related content on a bordered surface with header, content and footer.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Card to my app and wire it to my own data.
  • I need grouping related content on a bordered surface with header, content and footer. Set that up with the Knowns UI Card.
  • Which Card props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "card" }) and search_docs({ query: "card" }).

Need help?

Stuck on Card, or found something off? We read every message.