Skip to Content

Notification

Notifications with a lot of customizable properties.
  • id?: string
  • When set the current notification will be unique and only shown once on screen when spammed.
  • title?: string
  • Must provide if there is no description.
  • description?: string
  • Must provide if there is no title.
  • Markdown support (You can use \n to break line, or set custom color)
  • duration?: number
  • Default: 3000
  • showDuration?: boolean
  • Default: true
  • position?: 'top' or 'top-right' or 'top-left' or 'bottom' or 'bottom-right' or 'bottom-left' or 'center-right' or 'center-left'
  • Default: 'top-right'
  • type?: 'info' or 'error' or 'success' or 'warning'
  • Default: 'info'
  • icon?: string
  • Font Awesome 6 icon name
  • iconAnimation?: 'spin' or 'spinPulse' or 'spinReverse' or 'pulse' or 'beat' or 'fade' or 'beatFade' or 'bounce' or 'shake'
  • sound?: { bank?: string, set: string, name: string } | string
  • If string, it’s supposed to be the file name that can be found in web/build/sounds/. It has to be a .mp3 file. You do not have to put .mp3, only the file name!
  • bank?: string

name of audio bank that contains the soundset provided

  • set: string

Soundset the soundname is a member of.

  • name: string
  • volume?: number
  • Default: 0.1

Example

ox_lib example

lib.notify({ description = 'Profile updated **successfully**', duration = 3000, position = 'top-center', type = 'success' }) lib.notify({ description = 'Custm Sounds', duration = 3000, position = 'top-center', sound = "beep", -- beep.mp3 should be in web/build/sounds volume = 1.0, type = 'success' }) lib.notify({ description = 'Prism UI Pack is **now available**', duration = 3000, type = 'info' }) lib.notify({ description = 'Failed to save changes', duration = 3000, type = 'error' }) lib.notify({ description = 'Your session is about to expire', duration = 3000, type = 'warning' }) lib.notify({ description = 'This is a custom notification.', duration = 3000, title = 'Custom', icon = 'hamburger' }) lib.notify({ description = 'This is a custom notification. \nLine-break support.\n ~r~Red color support\n ~g~Green color support\n ~b~Blue color support\n ~y~Yellow color support\n ~p~Purple color support\n ~o~Orange color support\n ~k~Black color support\n ~w~White color support\n ~s~Resets to default color.', duration = 3000, title = 'Custom', icon = 'hamburger' })

Prism UI example

exports['prism_uipack']:Notify({ description = 'Profile updated **successfully**', duration = 3000, position = 'top-center', type = 'success' }) exports['prism_uipack']:Notify({ description = 'Prism UI Pack is **now available**', duration = 3000, type = 'info' }) exports['prism_uipack']:Notify({ description = 'Failed to save changes', duration = 3000, type = 'error' }) exports['prism_uipack']:Notify({ description = 'Your session is about to expire', duration = 3000, type = 'warning' }) exports['prism_uipack']:Notify({ description = 'This is a custom notification.', duration = 3000, title = 'Custom', icon = 'hamburger' })

Prism UI Pack
Last updated on