Import
Basic Usage
Props
Raw data object containing all field values. The component extracts values using the
key paths defined in fields.Card title displayed in the header section
Array of field configurations and dividers. Each field defines how to extract and display a value from the data object.See Field Types for available field configurations.
Number of columns to display on desktop. The layout automatically responds to container width:
- 3 columns: 1 → 2 → 3 columns (at 400px, 600px breakpoints)
- 4 columns: 1 → 2 → 3 → 4 columns (at 400px, 600px, 800px breakpoints)
Additional CSS classes for custom styling
Action component displayed in the card header (e.g., an Edit button)
Field Types
The DescriptionCard supports 7 specialized field types, each with specific rendering and metadata options.Text Field (default)
Standard text display with optional copy functionality and truncation.Badge Field
Displays values as colored status badges with automatic variant mapping.- Automatically converts values to sentence case (“CONFIRMED” → “Confirmed”)
- Falls back to neutral variant if value not in map
- See Badge component for available variants
Money Field
Formats currency values with proper locale formatting.$1,234.56
Date Field
Formats date/timestamp values with multiple format options.short: 12/25/2023medium: Dec 25, 2023long: December 25, 2023relative: 2 days ago
Link Field
Renders clickable links with optional external icon.Reference Field
Displays a value with a link to a related document.Address Field
Displays multi-line address information (always takes full width).Field Configuration Options
Nested Data Access
Use dot notation to access nested properties:Empty Value Handling
Control how empty/null/undefined values are displayed:"dash"(default): Shows ”—” for empty values"hide": Completely hides the field if value is empty
Section Dividers
Add visual separators between groups of fields:Complete Example
Responsive Behavior
The DescriptionCard uses CSS container queries to respond to its container width (not viewport width). This ensures correct behavior when placed in narrow containers or sidebars. 3 Column Mode (default):- Container < 400px: 1 column
- Container 400px - 599px: 2 columns
- Container ≥ 600px: 3 columns
- Container < 400px: 1 column
- Container 400px - 599px: 2 columns
- Container 600px - 799px: 3 columns
- Container ≥ 800px: 4 columns