Groot Development
Store
  • 👋Welcome
  • Coding Information
    • Register Key Mapping
  • ASSETS
    • 🕙g-duty
      • Why?
      • Installation
      • Config.lua
    • 📋g-scoreboard-V1
      • Installation
      • Config.lua
    • 📋g-scoreboardV2
      • Installation
      • Config.lua
      • Exports & Events
    • 🎁g-giftcard
      • Installation
      • Config.lua
      • Export
    • 🏡g-job-vehicle-shop
      • Installation
      • ⚙️Configuration
        • Exports
        • Create Vehicle Management Panel
        • Create Vehicle Shops
    • 💯g-redeem-code
      • 🗒️Features
      • Installation
      • ⛔Note
      • ⚙️Configuration
        • Create New item
    • 📖g-pausemenu
      • 🗒️Features
      • Installation
      • ⚙️Features Guide
        • Info Buttons
        • socials Buttons
        • Rules
        • Organization Avatar
    • 🛠️g-crafting
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ❔Why
      • ⚔️Exports
      • Configuration
        • How to Create New Station
        • How to Create crafting time for an item.
    • 🛒g-shopsV2
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ⚔️Exports
      • Configuration
        • How to Create New Shop
        • How to create new item
    • 🔧g-adv-modern-repairkit
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ⚙️Configuration
  • 📖g-pausemenu-simplified
    • 📦Patch Details
    • Installation
    • ❔Why
    • Configuration
      • Git Dev Patchs
  • FREE RELEASE
    • 🎁g-starterpack-gift
      • Installation
      • Config.lua
    • 👨‍🔬g-employee-chat-list
      • Installation
    • g-notifications
      • Installation
      • Notification
      • Framework Integration
      • Remove Notification By ID
Powered by GitBook
On this page
  • Positions
  • Notification Variations
  • Types
  • Icons
  1. FREE RELEASE
  2. g-notifications

Notification

Simple use case

exports["g-notifications"]:Notify({
	title = "Announcement",
	description = "Announcement server",
	type = "info",
})
exports["g-notifications"]:Notify({
    id = "Title",                      -- (string) Unique identifier for the notification (optional)
    title = "Title",                   -- (string) Title text displayed on the notification
    description = "Description",       -- (string) Main message or description text
    duration = 5000,                   -- (number) Duration in milliseconds the notification stays visible
    showDuration = true,               -- (bool) Show countdown timer bar (true/false)
    type = "info",                    -- (string) Notification type: "info" | "success" | "warn" | "error" | "default"
    position = "top-right",            -- (string) Position on screen:
                                      -- "bottom-left" | "bottom-right" | "bottom-center" | "top-left" | "top-right" | "top-center" | "center" | "top-full" | "bottom-full"
    EnableSound = true,                -- (bool) Play a notification sound (true/false)
    soundName = "notification1",      -- (string) Sound file name from `g-notifications/web/build/audio/` folder (.ogg format only)
    variant = "type3",                 -- (string) Notification style variant: "type1" | "type2" | "type3" | "type4"
    styles = {                        -- (table) Custom styles for notification colors (all optional)
        ["bgcolor"] = "#003f2d",      -- Background color
        ["iconbg"] = "#00b37e",       -- Icon background color
        ["iconColor"] = "#fff",       -- Icon color
        ["textColor"] = "#ffffff"     -- Text color
    },
    icon = "bell"                     -- (string) Icon name from FontAwesome free icons [https://fontawesome.com/icons?d=gallery&s=solid&m=free]
})

Server-Side Notification

TriggerClientEvent("g-notification:notify", source, {
	title = "Server Notification",
	description = "This notification was sent from the server!",
	type = "info",  -- success | error | warn | info
	position = "top-right",  -- refer to the g-notifications config
	duration = 5000,
	showDuration = true
})

Positions

"bottom-left" | "bottom-right" | "bottom-center" | "top-left" | "top-right" | "top-center" | "center" | "top-full" | "bottom-full"

Notification Variations

"type1" | "type2" | "type3" | "type4"

Types

"info" | "success" | "warn" | "error" | "default" -- or you can create your own type via config

Icons

Last updated 23 days ago

Font Awesome 6 icon name. -

https://fontawesome.com/search?o=r&m=free