React Native MantineOverlays

LoadingOverlay

Full-screen loading state

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

Usage

import { useState } from 'react';
import { View } from 'react-native';
import { LoadingOverlay, Text } from 'react-native-mantine';

const [visible, setVisible] = useState(true);

<View style={{ height: 120, position: 'relative' }}>
  <LoadingOverlay visible={visible} overlayOpacity={0.75} loaderSize="md" />
  <Text>Content under the overlay</Text>
</View>

Props

PropTypeDefaultDescription
visible (required)booleanfalseControls overlay visibility
overlayOpacitynumber0.75Overlay opacity
overlayColorstring'#fff'Overlay color
overlayBlurnumber0Overlay blur (not fully supported in React Native)
loaderSize'xs' | 'sm' | 'md' | 'lg' | 'xl''md'Loader size
radiusMantineNumberSize0Border radius
zIndexnumber1000Z-index
transitionDurationnumber200Transition duration in ms
styleanyAdditional styles
testIDstringTest identifier used by testing frameworks

Source on GitHub · npm