React Native MantineData display

BackgroundImage

Container with background image

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

Usage

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

<BackgroundImage
  source={{ uri: 'https://unsplash.it/640/425' }}
  radius="md"
  style={{ height: 150 }}
>
  <Text style={{ color: '#fff', padding: 16 }}>Content over image</Text>
</BackgroundImage>

Props

PropTypeDefaultDescription
source (required)ImageSourcePropTypeBackground image source
radiusMantineNumberSize0Key of theme.radius or any valid value to set border-radius
childrenReact.ReactNodeBackground image children
styleanyAdditional styles
testIDstringTest identifier used by testing frameworks

Source on GitHub · npm