React Native MantineTypography

Mark

Marked/highlighted inline text

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

Usage

import { Mark, Text  } from 'react-native-mantine';

// Default yellow highlight
<Text>
  This is <Mark>highlighted</Mark> text
</Text>

// Custom color
<Text>
  <Mark color="blue">Important</Mark> notice
</Text>

// Multiple marks
<Text>
  <Mark color="yellow">Warning</Mark> and <Mark color="red">Error</Mark>
</Text>

Props

PropTypeDefaultDescription
colorstring'yellow'Background color key from theme.colors (e.g., "yellow", "blue") or color value
childrenReact.ReactNodeText content to highlight with background color
withTextWrapperbooleantrueIf false, returns children without wrapping in Text component
styleTextStyleAdditional styles to apply to the text
sizestringText size from theme (inherited from Text)
whitebooleanfalseSets text color to white
boldbooleanfalseApplies bold font weight
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