React Native Mantine › Miscellaneous
Portal
Render children into an overlay or a named host
Import: import { Portal } from 'react-native-mantine';
Usage
import {
Portal,
PortalHost,
PortalProvider,
} from 'react-native-mantine';
// Wrap your app (inside ThemeProvider)
<PortalProvider>
<App />
</PortalProvider>
// Renders into the provider overlay on top of everything
<Portal>
<Notification title="Teleported" />
</Portal>
// Renders into a named host somewhere else in the tree
<Portal target="bottom-bar">
<Badge>Teleported</Badge>
</Portal>
<PortalHost name="bottom-bar" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
name (required) | string | Host name, portals with a matching target render here |