Skip to content

Card

Cards render official ID layouts (Ghana Card, Voter ID, Passport, Driver License), informational notice tiles, a simple default container, and wallet shells with optional header, body, footer, and background art. Configure them with type and cardDetails.

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...

cardDetails.side is front or back.

ecowas
Ecowas Identity Card
Republic of Ghana
ghana flag
chip
sample_avatar
ghana-map

Surname/Nom

ASANTE

Firstnames/Prenoms

KWAME NKRUMAH

Nationality/Nationalite

GHANA

Date of Birth/Date de Naissance

15/09/1990

Personal ID Number

GHA-123456789-1

Sex/Sexe

m

Height/Taille (m)

1.75

Document Number/Numero du document

C123456789

Date of Issue/Date de delivrance

01/01/2020

Date of Expiry/Date d'expiration

01/01/2030
sample_avatar1234
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' | 'ghana-card' | 'voters-id' | 'passport' | 'driver-license' | '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
surname-stringLast name of the card holder.
firstName-stringFirst name of the card holder.
nationality-stringNationality of the card holder.
dateOfBirth-stringDate of birth in DD/MM/YYYY format.
personalIDNumber-stringPersonal identification number.
documentNumber-stringDocument number of the card.
side'front''front' | 'back'Which side of the card to display.
gender-'male' | 'female'Gender of the card holder.
dateOfIssue-stringDate the card was issued.
dateOfExpiry-stringDate the card expires.
PropsDefaultTypeDescription
surname-stringLast name of the voter.
firstName-stringFirst name of the voter.
gender-'male' | 'female'Gender of the voter.
dateOfBirth-stringDate of birth in DD/MM/YYYY format.
pollingStationNumber-stringAssigned polling station number.
voterIDNumber-stringUnique voter identification number.
dateOfRegistration-stringDate of voter registration.
PropsDefaultTypeDescription
passportNumber-stringPassport identification number.
surname-stringLast name of the passport holder.
firstName-stringFirst name of the passport holder.
nationality-stringNationality of the passport holder.
gender-'male' | 'female'Gender of the passport holder.
dateOfBirth-stringDate of birth in DD/MM/YYYY format.
placeOfBirth-stringPlace of birth.
dateOfIssue-stringDate the passport was issued.
dateOfExpiry-stringDate the passport expires.
placeOfIssue-stringPlace where the passport was issued.
PropsDefaultTypeDescription
licenseNumber-stringDriver license identification number.
surname-stringLast name of the license holder.
firstName-stringFirst name of the license holder.
gender-'male' | 'female'Gender of the license holder.
dateOfBirth-stringDate of birth in DD/MM/YYYY format.
nationality-stringNationality of the license holder.
classOfLicense-stringClass/category of the driving license.
dateOfIssue-stringDate the license was issued.
dateOfExpiry-stringDate the license expires.
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.