Skip to main content
  1. Docs
  2. Components
  3. Layout

Card

Related content on a page: a raised, ruled surface with no shadow. A titled card is a section named by its title.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<section>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A group of settings, a list, a summary.
  • A table, edge to edge, with Pagination in its footer.
Not for
  • A surface with no title or structureBox
  • Something to clickButton
  • Sections that foldAccordion

02

Anatomy

  1. 1card-heading<div>The title, a heading at level, and its description.
  2. 2card-actions<div>Actions at the header's end: a ghost button.
  3. 3card-body<div>The content; a Table here runs edge to edge.
  4. 4card-footer<div>Ruled: the card's own actions, the primary last.

03

Do and don't

No card in a card
DoOne surface, its parts divided by space.
Don'tCards nested: borders inside borders.
Titled, at the right level
DoA title and its level, under the page's heading.
Don'tBold text where the title goes: no section, no heading.

04

Content

  • Titles name what's inside, a word or three: Recent sign-ins.
  • One line of description, if it helps.
  • Footer actions: Cancel, then the primary.
Next — CardAPI