Default

import { Notification } from '@davaux/ui'

<Notification title="Update available" message="A new version is ready to install." />

Colors

<Notification color="blue" title="Info" message="Request processing." icon={infoIconHtml} />
<Notification color="green" title="Success" message="Changes saved." icon={checkIconHtml} />
<Notification color="yellow" title="Warning" message="Session expiring soon." />
<Notification color="red" title="Error" message="Something went wrong." />

Without close button

<Notification
  color="violet"
  title="Persistent"
  message="Cannot be dismissed."
  withCloseButton={false}
/>

Props

PropTypeDefaultDescription
titlestringHeading text above the message
messagestring''Main body text
colorstring'blue'Theme color applied to the icon and accent
iconstringRaw SVG HTML string for the notification icon
visiblebooleantrueInitial visibility state
withCloseButtonbooleantrueShows the dismiss button
autoClosenumber0Auto-dismiss after this many milliseconds (0 = disabled)