Detail Card

Expandable cards for displaying detailed information with collapsible sections. Perfect for showing additional context, settings, or grouped information.

Basic Example

With Subtitle

Default Expanded

Important Notice

This card starts expanded by default, making the content immediately visible. Users can still collapse it if they want.

Non-Collapsible

System Status

This card cannot be collapsed. The content is always visible. Use this for critical information that should always be shown.

With Header Badge

With Footer

Multiple Cards

Props

NameTypeDefaultDescription
titlestring-Card title displayed in the header
subtitlestringundefinedOptional subtitle text below the title
defaultExpandedbooleanfalseWhether the card starts in expanded state
collapsiblebooleantrueWhether the card can be collapsed/expanded
headerReactNodeundefinedCustom content in the header (badges, icons, etc.)
footerReactNodeundefinedFooter content shown when card is expanded
childrenReactNode-Main content of the card body

Usage Guidelines

When to use

  • Grouped Information: Display related information that can be collapsed to save space
  • Progressive Disclosure: Show summary in header, details in body
  • Settings Sections: Organize settings into logical, collapsible groups
  • List Items with Details: Show item overview with expandable details

Best practices

  • Clear Titles: Use descriptive titles that summarize the card content
  • Useful Subtitles: Provide context or metadata in the subtitle
  • Start Collapsed: Keep cards collapsed by default unless content is critical
  • Header Badges: Use header slot for status indicators or metadata
  • Footer Actions: Place actions in footer when content is expanded
  • Non-Collapsible Sparingly: Only disable collapsing for critical information

Accessibility

  • Header is keyboard accessible (Tab, Enter, Space)
  • Proper ARIA attributes for expanded/collapsed state
  • Chevron icon indicates collapsible state visually
  • Focus indicator on header when using keyboard navigation

Do's and Don'ts

Do

  • Use descriptive titles that clearly explain the card content
  • Start cards collapsed by default to reduce visual clutter
  • Use badges in the header slot for status indicators
  • Place actions in the footer when card is expanded

Don't

  • Use vague titles like "Details" or "Information"
  • Start all cards expanded, creating a cluttered interface
  • Nest detail cards inside other detail cards
  • Make cards non-collapsible unless absolutely necessary

Info

Some details here

Related Components

Resources