React Native MantineFeedback

Notification

Styled notification message

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

Usage

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

<Notification
  title="Success"
  message="Your changes have been saved successfully"
  color="green"
  withCloseButton
  onClose={() => console.log('Closed')}
/>

Props

PropTypeDefaultDescription
titleReact.ReactNodeNotification title displayed at the top in bold
messageReact.ReactNodeMain notification message content
childrenReact.ReactNodeAlternative to message prop for custom notification content
colorMantineColor"blue"Notification color from theme, affects the left border color when withBorder is true
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl""sm"Key of theme.radius or any valid number to set border-radius
iconReact.ReactNodeIcon displayed on the left side of the notification
withCloseButtonbooleantrueIf true, displays a close button on the right side
onClose() => voidCallback fired when close button is clicked. Close button only shows if this prop is provided
loadingbooleanfalseIf true, displays a loading indicator (currently not implemented in styles)
withBorderbooleantrueIf true, adds a border around notification with colored left border accent
withTextWrapperbooleantrueControls whether title and message are automatically wrapped in Text components
styleViewStyleAdditional styles to apply to the notification container

Source on GitHub · npm