Design systems that feel native RNUI pairs semantic tokens with polished components so your product reads consistently on iOS and Android without reinventing spacing, color, or type on every screen.
Why teams choose RNUI Ship faster with accessible defaults, subtle elevation, and motion that respects reduced-motion preferences.
Updated 2 days ago · 4 min read
Typography component for consistent text styling with predefined variants.
import { Typography } from ' @truongdq01/ui ' ;
< Typography variant = " h1 " > Heading 1 </ Typography > ;
Prop Type Default Description childrenReactNode— Text content variantTypographyVariant"body1"Text style variant align"left" | "right" | "center" | "justify" | "inherit""left"Text alignment color"primary" | "secondary" | "tertiary" | "disabled" | "brand" | "error" | string"primary"Text color gutterBottombooleanfalseAdd margin bottom noWrapbooleanfalseTruncate to single line paragraphbooleanfalseAdd paragraph margin display"none" | "flex" | "contents" | "block" | "inline" | "inline-flex"— CSS display property styleTextStyle— Additional inline styles
< Typography variant = " h1 " > Heading 1 - 2.5rem / 32px </ Typography >
< Typography variant = " h2 " > Heading 2 - 2rem / 28px </ Typography >
< Typography variant = " h3 " > Heading 3 - 1.75rem / 24px </ Typography >
< Typography variant = " h4 " > Heading 4 - 1.5rem / 20px </ Typography >
< Typography variant = " h5 " > Heading 5 - 1.25rem / 18px </ Typography >
< Typography variant = " h6 " > Heading 6 - 1rem / 16px </ Typography >
< Typography variant = " subtitle1 " > Subtitle 1 - 1rem / 16px, Medium weight </ Typography >
< Typography variant = " subtitle2 " > Subtitle 2 - 0.875rem / 14px, Medium weight </ Typography >
< Typography variant = " body1 " > Body 1 - 1rem / 16px, Regular weight (default) </ Typography >
< Typography variant = " body2 " > Body 2 - 0.875rem / 14px, Regular weight </ Typography >
For hero banners, marketing headlines, and data callouts — not document headings or body content.
< Typography variant = " display1 " > Display 1 - hero </ Typography >
< Typography variant = " display2 " > Display 2 - $1.2M </ Typography >
< Typography variant = " display3 " > Display 3 - callout </ Typography >
< Typography variant = " caption " > Caption - 0.75rem / 12px, Regular weight </ Typography >
< Typography variant = " button " > Button - 0.875rem / 14px, Medium weight </ Typography >
< Typography variant = " overline " > Overline - 0.75rem / 12px, Uppercase </ Typography >
< Typography variant = " inherit " > Inherit - Inherits parent styles </ Typography >
< Typography align = " left " > Left aligned text </ Typography >
< Typography align = " center " > Center aligned text </ Typography >
< Typography align = " right " > Right aligned text </ Typography >
< Typography align = " justify " > Justified text </ Typography >
< Typography color = " primary " > Primary text color </ Typography >
< Typography color = " secondary " > Secondary text color </ Typography >
< Typography color = " tertiary " > Tertiary text color </ Typography >
< Typography color = " disabled " > Disabled text color </ Typography >
< Typography color = " brand " > Brand color </ Typography >
< Typography color = " error " > Error color </ Typography >
< Typography color = " #FF5733 " > Custom hex color </ Typography >
// Single line with ellipsis
This is a very long text that will be truncated with an ellipsis if it exceeds
< Typography gutterBottom > Text with bottom margin </ Typography >
< Typography paragraph > First paragraph </ Typography >
< Typography paragraph > Second paragraph </ Typography >
< Typography display = " block " > Block level text </ Typography >
< Typography display = " inline " > Inline text </ Typography >
< Typography display = " inline-flex " > Inline flex container </ Typography >
< Typography variant = " h1 " align = " center " gutterBottom >
< Typography variant = " subtitle1 " align = " center " color = " secondary " >
A beautiful UI component library
< Typography variant = " h6 " gutterBottom >
< Typography variant = " body2 " color = " secondary " >
Card description text goes here.
< Typography variant = " subtitle2 " gutterBottom >
< Input placeholder = " name@example.com " />
< Typography variant = " caption " color = " error " >
Please enter a valid email address
< Input label = " Password " />
< Typography variant = " caption " color = " tertiary " >
Must be at least 8 characters
Use semantic heading hierarchy (h1 → h2 → h3)
Keep body text at readable size (16px minimum)
Use appropriate line height for readability
Maintain color contrast for accessibility
Don’t skip heading levels (h1 → h3)
Don’t use tiny text (< 12px)
Don’t use low contrast colors for body text
Don’t use too many font variants on one page
accessibilityRole = " header "
Variant Font Size Line Height Weight Use Case h1 2.5rem (40px) 1.2 700 Page titles h2 2rem (32px) 1.2 600 Section headers h3 1.75rem (28px) 1.3 600 Subsections h4 1.5rem (24px) 1.3 600 Card titles h5 1.25rem (20px) 1.4 600 Group headers h6 1rem (16px) 1.4 600 Item headers subtitle1 1rem (16px) 1.5 500 Secondary headings subtitle2 0.875rem (14px) 1.5 500 Small subtitles body1 1rem (16px) 1.6 400 Body text (default) body2 0.875rem (14px) 1.6 400 Secondary body caption 0.75rem (12px) 1.5 400 Captions, hints button 0.875rem (14px) 1.5 500 Button text overline 0.75rem (12px) 1.5 500 Labels, overlines
Text - React Native Text component
Icon - Icons to pair with text
Link - Clickable text links