React Native MantineOverlays

Overlay

Customizable overlay backdrop

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

Usage

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

<View style={{ position: 'relative' }}>
  <Overlay
    opacity={0.6}
    color="#000"
    onPress={() => console.log('Overlay pressed')}
  />
  <YourContent />
</View>

Props

PropTypeDefaultDescription
opacitynumber0.6Controls overlay opacity, value between 0 (transparent) and 1 (opaque)
colorstring"#000"Overlay background color, typically a hex color or named color
blurnumberControls overlay blur effect (note: not fully supported in React Native)
zIndexnumber1000Controls overlay z-index for stacking order
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl"0Key of theme.radius or any valid number to set border-radius
childrenReact.ReactNodeContent to render inside the overlay
onPress() => voidCallback fired when overlay is pressed. If provided, overlay becomes touchable
fixedbooleanfalseIf true, overlay will not block touches to underlying content
styleViewStyleAdditional styles to apply to the overlay

Source on GitHub · npm