DetailsCard

Composable read-only card for structured label-value data.

Quick Preview

Personal details

Information from your verified profile

SW
Full name
Samuel Wilson
Date of Birth
January 1, 1987
Gender
Male
Nationality
American
Phone Number
(213) 555-1234
Email
wilson@example.com

Composition

Use this public composition when building DetailsCard:

DetailsCard
├── DetailsCardHeader
│   ├── DetailsCardTitle
│   └── DetailsCardDescription
└── DetailsCardBody
    ├── DetailsCardRow
    │   ├── DetailsCardIcon
    │   ├── DetailsCardLabel
    │   └── DetailsCardValue
    └── DetailsCardRowGroup
        └── DetailsCardRow

Usage

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

SW
Full name
Samuel Wilson
Date of Birth
January 1, 1987
Gender
Male
Nationality
American
Phone Number
(213) 555-1234
Email
wilson@example.com

Orientation 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

Full name
Samuel Wilson
Date of Birth
January 1, 1987
Gender
Male
Nationality
American
Phone Number
(213) 555-1234
Email
wilson@example.com

Personal details

Information from your verified profile

Full name
Samuel Wilson
Date of Birth
January 1, 1987
Gender
Male
Nationality
American
Phone Number
(213) 555-1234
Email
wilson@example.com

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

Full name
Samuel Wilson
Date of Birth
January 1, 1987
Gender
Male
Nationality
American
Phone Number
(213) 555-1234
Email
wilson@example.com

Props

Prop/APITypeDefaultDescription
orientation"horizontal" | "vertical""horizontal"Sets row label/value layout on DetailsCardBody.
showIconsbooleantrueKeeps or removes the row icon gutter on DetailsCardBody.
renderBase UI render prop-Changes rendered element while preserving styles.
classNamestring-Local layout or spacing overrides.
native/root propsReact 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.

On this page