Skip to content

Card

Card renders informational notice tiles, a simple default container, and wallet shells with optional header, body, footer, and background art. Configure them with type and cardDetails.

For official ID documents (Ghana Card, Voter ID, Passport, Driver License), use Identity Card instead.

Loading Code Block...

Pass cardDetails.content as a string or . The default shell is h-[254px] with p-[24px] padding — when using fixed-size content (e.g. w-96 h-[188px]), set containerClassName="h-[236px]" so shell height equals content + padding (188 + 48).

Default Card

Loading Code Block...

All slots — header, body, and footer — are optional, so you can render header-only or footer-only wallet shells. Use backgroundImage, overlay, overlayClassName, and overlayBackgroundColor for visual treatment.

Sophie Thompson

0241234567

MTN Airtime

top up
Loading Code Block...

Use the control to switch type and inspect the matching cardDetails payload in the code panel.

Custom Content
Loading Code Block...

Switch the control to compare mobile money, credit-style, and minimal wallet layouts.

Sophie Thompson

0241234567

MTN Airtime

top up
Loading Code Block...

PropsDefaultTypeDescription
type'default''default' | 'notice' | 'wallet'The type of card to display. Each type has its own data structure.
cardDetails{}objectData and configuration for the card. Structure varies by card type.
PropsDefaultTypeDescription
content-ReactNodeMain body. Pass any `ReactNode` (string, JSX, fragment, array). Falls back to a built-in placeholder when omitted.
containerClassName-stringClasses on the outer card container.
PropsDefaultTypeDescription
content-ReactNodeMain content of the notice card. Falls back to a built-in placeholder when omitted.
showFootertruebooleanWhether to show the footer section.
footerHeader'Notice Card'stringHeader text for the footer section.
footerDescription'Mar 22, 2023 | 6 minutes read'string | ReactNodeFooter description. React always wraps the value in a `<p>` element — passing a block-level node (e.g. `<div>`) produces invalid HTML.
chip{ text: 'Label', color: 'primary', size: 'sm' }ChipsPropsChip/badge configuration for the card footer.
containerClassName-stringCustom CSS classes for the card container.
footerHeaderClassName-stringClasses for the footer title line.
footerDescriptionClassName-stringClasses for the footer description line.
footerContainerClassName-stringClasses for the footer wrapper.
PropsDefaultTypeDescription
backgroundImage-stringURL of the background image.
containerClassName-stringCustom CSS classes for the card container.
overlayClassName-stringCustom CSS classes for the overlay.
overlayBackgroundColor'black'stringBackground colour for the overlay.
header-ReactNodeHeader content. Accepts the full `ReactNode` union (string, JSX, fragment).
body-ReactNodeMain body content. Optional in both frameworks.
footer-ReactNodeFooter content. Accepts the full `ReactNode` union.
overlaytruebooleanWhether to show overlay on the card.