React Native MantineNavigation

Anchor

Styled link component

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

Usage

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

<Anchor href="https://mantine.dev" color="blue">
  Open Mantine docs
</Anchor>

<Anchor variant="text" onPress={() => console.log('pressed')}>
  Press me
</Anchor>

Props

PropTypeDefaultDescription
colorMantineColor'blue'Anchor text color from theme
sizeMantineSize'md'Anchor text size
weightTextStyle['fontWeight']'400'Anchor text weight
underlinebooleantrueIf true, anchor text is underlined
variantVariants<'text' | 'link'>'link'Variant of anchor
hrefstringURL to open when anchor is pressed (opens in browser)
onPress() => voidCalled when anchor is pressed
childrenReact.ReactNodeAnchor content
styleanyAdditional styles
testIDstringTest identifier used by testing frameworks
withTextWrapperbooleantrueIf false, children will not be wrapped in a Text component. This is useful when the children contain non-text elements like icons or custom components.

Source on GitHub · npm