DetailsCard
Composable read-only card for structured label-value data.
Quick Preview
Personal details
Information from your verified profile
SWComposition
Use this public composition when building DetailsCard:
DetailsCard
├── DetailsCardHeader
│ ├── DetailsCardTitle
│ └── DetailsCardDescription
└── DetailsCardBody
├── DetailsCardRow
│ ├── DetailsCardIcon
│ ├── DetailsCardLabel
│ └── DetailsCardValue
└── DetailsCardRowGroup
└── DetailsCardRowUsage
import {
Avatar,
AvatarFallback,
} from "@giddaa-housing/ui/avatar";
import {
DetailsCard,
DetailsCardBody,
DetailsCardHeader,
DetailsCardLabel,
DetailsCardRow,
DetailsCardTitle,
DetailsCardValue,
} from "@giddaa-housing/ui/details-card";
<DetailsCard>
<DetailsCardHeader>
<DetailsCardTitle>Personal details</DetailsCardTitle>
<Avatar className="mt-gdt-md" size="sm">
<AvatarFallback>SW</AvatarFallback>
</Avatar>
</DetailsCardHeader>
<DetailsCardBody>
<DetailsCardRow>
<DetailsCardLabel>Status</DetailsCardLabel>
<DetailsCardValue>Verified</DetailsCardValue>
</DetailsCardRow>
</DetailsCardBody>
</DetailsCard>;Examples
Default DetailsCard
Use this as the starting point for read-only structured data. Keep fetching, authorization, and formatting logic in the consuming app.
Personal details
Information from your verified profile
SWOrientation and Icons
Use vertical orientation for long values and showIcons={false} when the icon gutter is not needed.
Personal details
Information from your verified profile
Personal details
Information from your verified profile
Grid Rows
Use DetailsCardRowGroup when multiple row items share one visual row and need a connected divider. Pass responsive grid classes through className.
Personal details
Information from your verified profile
Props
| Prop/API | Type | Default | Description |
|---|---|---|---|
orientation | "horizontal" | "vertical" | "horizontal" | Sets row label/value layout on DetailsCardBody. |
showIcons | boolean | true | Keeps or removes the row icon gutter on DetailsCardBody. |
render | Base UI render prop | - | Changes rendered element while preserving styles. |
className | string | - | Local layout or spacing overrides. |
| native/root props | React component props | - | Passed through to the underlying root or slot primitive. |
Accessibility
- Use DetailsCard for read-only content; do not place buttons, toggles, or links inside rows.
- Use semantic text labels and values so the content remains understandable without icons.
- Keep product-specific formatting, navigation, and data fetching outside the UI package.
- Provide an accessible name when rendering the card as a landmark or region.