PatientCard.BirthDate.Text
Date and age text display component with flexible formatting.
- Stable unknown
- Release candidate since 1.16.1-rc.3
- Development since 1.16.1-dev.2111+9796905
Date and age text display component with flexible formatting.
Basic Example
import { PatientCard } from "@ovok/native";
import * as React from "react";
const birthDate = "1990-01-01";
const ShowAgeOnly = () => (
<PatientCard.BirthDate.Text birthDate={birthDate} variant="age" />
);
export default ShowAgeOnly;
Props
Every prop, with its type and description, is listed in the @ovok/native/patient API reference.
Localization
The component uses these translation keys:
{
"patient-card": {
"age-years": "{{age}} years old",
"birth-date-with-age": "{{date}} ({{age}} years old)"
}
}Styling
Theme Colors Used
theme.colors.onSurfaceVariant- Text colortheme.fonts.bodyMedium- Text typography
Date Calculation
- Uses
date-fnsfor reliable age calculation - Handles timezone differences appropriately
- Supports various date format patterns
- Provides localized age display with translations
Last updated on
PatientCard.BirthDate.Icon
Calendar icon component using Calendar2 from iconsax-react-nativejs.
PatientCard
A touchable card container component designed for displaying patient information in healthcare applications. Built with compound architecture to provide flexible composition of patient data elements with consistent Material Design 3 styling; add accessibility semantics through the touchable props in the host app.