SectionCard

A bordered card with a title bar, for grouping related content

Installation

pnpm add @wandercom/design-system-web

Usage

9 lines
import { SectionCard } from '@wandercom/design-system-web/ui/section-card';

export default function Example() {
  return (
    <SectionCard title="Set rules and policies">
      …
    </SectionCard>
  );
}

Examples

A default card with padded body content, matching the onboarding prototype's "Booking type" card, and a noBodyPadding card for edge-to-edge content, matching its "Cancellation policy" row:

Loading example...

Props

SectionCardProps

title:

React.ReactNode
Title shown in the card's title bar, rendered as an `h2`.

action?:

React.ReactNode
Optional action shown on the right of the title bar. The slot doesn't compensate for the action's own padding, so a default-sized `Button` sits inset from the edge and grows the bar taller than the title's line-height. Prefer a flush action like `<Button variant="link">`, which keeps the bar at 36px and aligned with the title's 16px inset.

children?:

React.ReactNode
Body content.

noBodyPadding?:

boolean
Removes the body's padding, for edge-to-edge content such as a full-width row list.

className?:

string
Additional CSS classes to apply to the card root.

classNames?:

{ header?, title?, action?, body? }
Granular CSS class overrides for internal elements.
SectionCard