Skip to content

Card

stable

Container with structured border and optional header

import { Card } from "@nodus/design-system"
Loading demo…

Props

variant
Type "default" | "dark" | "yellow"Default "default"

Visual style variant

label
Type stringDefault

Optional header label

Accessibility

  • Renders as a <div> with no implicit role. Use role="region" with aria-labelledby for landmark navigation when the card represents a major section.
  • The label prop renders as a visual text header, not a semantic <h*> element. Add a heading inside the card's children for correct document outline.
  • Accepts all HTMLAttributes<HTMLDivElement> including role, aria-label, and aria-describedby.
  • Color variants (dark, yellow) maintain sufficient contrast — text tokens are chosen per variant to meet WCAG AA.
Metadatasemanticbordersurface
MobileStacks / Scroll

Cards with horizontal interior layout (e.g. icon + content + action) stack to single column below sm breakpoint. Use flex-col sm:flex-row pattern.

Design Rationale

This component was designed to express:

Explore Related

Was this helpful?