Card

The Card component is a flexible container for displaying information, media, and actions in a consistent layout.

Usage

Default Card

Default Card

This is a simple card with default props.

<Card title="Default Card" description="This is a simple card with default props." imageUrl={Logo} />

Props

Data table
TypeDescription
actionButtonsActionButton[]List of action buttons to render in the footer.
align"left" | "right" | "center"Alignment of card content ('left' | 'right' | 'center').
aria-atomicbooleanMarks the card as atomic for live region updates.
aria-controlsstringIndicates the controlled element id if the card acts as a controller.
aria-currentboolean | "page" | "step" | "location" | "date" | "time"Indicates current item state when the card is used in navigation-like UIs.
aria-describedbystringOptional ARIA description reference ID.
aria-expandedbooleanIndicates expanded state if the card controls collapsible content.
aria-labelstringOptional ARIA label for the card.
aria-labelledbystringOptional ARIA label reference ID for accessibility.
aria-live"off" | "polite" | "assertive"Live-region politeness, usually only useful for dynamic card content.
bodyClassNamestringCustom class name for the body section.
borderBorderTypeOptional border width for the card ('none' | 'xs' | 'small' | 'medium' | 'large' | 'xl').
cardIconIconTypeOptional icon to display beside the title.
childrenReactNodeOptional custom children passed into the body.
classNamestringCustom class name for the card container.
data-testidstringOptional test ID for test targeting.
descriptionstringOptional description displayed in the body.
descriptionIdstringOptional override for the generated description id.
disabledbooleanIndicates disabled state for the card.
footerClassNamestringCustom class name for the footer section.
headerClassNamestringCustom class name for the header section.
headerIdstringOptional override for the generated header id.
idstringOptional id for the card root.
imageAltstringImage alt text. Use empty string for decorative images.
imageClassNamestringCustom class name for the image element.
imageDecorativebooleanMarks the image as decorative and forces empty alt text.
imageFillbooleanUse fill layout for the image (next/image: fill; core: ratio-box render)
imageHeightnumberExplicit height for the image (forwarded to next/image or <img>)
imageUrlCardImageSourceImage URL or static asset used as the card's visual. Can be a string or an object with { src, width, height }.
imageWidthnumberExplicit width for the image (forwarded to next/image or <img>)
layoutOrientationTypeLayout orientation of the card ('horizontal' | 'vertical').
loadingbooleanWhether the card is in a loading state (shows skeleton).
outlinebooleanOutlines card instead of solid fill.
renderContent(() => ReactNode)Custom render function for the body/content section.
renderFooter(() => ReactNode)Custom render function for the footer section.
renderHeader(() => ReactNode)Custom render function for the header section.
roleAriaRoleOptional role override. Defaults to region when labeled.
roundingRoundingTypeOptional rounding style for the card ('none' | 'small' | 'medium' | 'large' | 'full').
selectablebooleanMarks the card as selectable.
selectedbooleanIndicates selected state for selectable cards.
shadowShadowTypeOptional shadow style for the card ('none' | 'light' | 'medium' | 'strong' | 'intense').
sizeSizeTypeCard size ('xs' | 'small' | 'medium' | 'large' | 'xl').
stateStateTypeState of the card ('success' | 'error' | 'warning' | 'disabled' | '').
tabIndexnumberOptional tabindex for keyboard navigation scenarios.
themeThemeTypeTheme style to apply to the card ('primary' | 'secondary' | 'tertiary' | 'quaternary' | 'clear').
titlestringOptional card title displayed in the header.
useIconButtonsbooleanWhether to render action buttons as icon buttons.