React Native MantineTypography

Title

Semantic heading with size variants

Import: import { Title } from 'react-native-mantine';

Usage

import { Title } from 'react-native-mantine';

<Title order={1}>Main Heading</Title>
<Title order={2}>Subheading</Title>
<Title order={3}>Section Title</Title>

// With custom styling
<Title order={2} style={{ color: '#228be6' }}>
  Colored Title
</Title>

// With text alignment
<Title order={1} align="center">
  Centered Title
</Title>

Props

PropTypeDefaultDescription
order1 | 2 | 3 | 4 | 5 | 61Heading order (h1-h6), determines the font size from theme.headings.sizes
childrenReact.ReactNodeText content to display in the heading
withTextWrapperbooleantrueIf false, returns children without wrapping in Text component
styleTextStyleAdditional styles to apply to the title text
sizestringText size (inherited from Text, but typically controlled by order prop)
colorstringText color - can be a theme color name or any valid color string
whitebooleanfalseSets text color to white
boldbooleanfalseApplies bold font weight (headings are bold by default)
semiBoldbooleanfalseApplies semi-bold font weight
weight'100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900'Font weight - numeric values from 100 (thin) to 900 (black)
align'left' | 'center' | 'right' | 'justify'Text alignment

Source on GitHub · npm