Features

Notification Styles

B2-SleekNotify offers two distinct notification styles to suit different needs.

Minimal Style

The minimal style provides clean, simple notifications perfect for quick information display.

Characteristics

  • Compact design

  • Left border color coding

  • Simple icon

  • One-line message

  • Timestamp

  • Close button

Usage

-- Configure minimal style
Config.Style = 'minimal'

-- Send minimal notification
exports['b2-sleeknotify']:CreateNotification({
    type = 'success',
    message = 'Vehicle stored successfully!'
})

Advanced Style

The advanced style offers richer notifications with additional visual elements.

Characteristics

  • Larger size

  • Title support

  • Gradient background

  • Prominent icon

  • Multi-line message support

  • Enhanced visual styling

  • Timestamp

  • Close button

Usage

-- Configure advanced style
Config.Style = 'advanced'

-- Send advanced notification
exports['b2-sleeknotify']:CreateNotification({
    type = 'success',
    title = 'Vehicle Stored',
    message = 'Your Sultan RS has been stored in Legion Square Garage'
})

Switching Styles

You can switch between styles by changing the Style option in your config.lua:

Config = {
    Style = 'minimal', -- or 'advanced'
    -- other config options...
}

Screen Positions

B2-SleekNotify supports 9 different screen positions for maximum flexibility.

Available Positions

Top Row

  • TOP_LEFT

  • TOP_CENTER

  • TOP_RIGHT (default)

Middle Row

  • MIDDLE_LEFT

  • MIDDLE_CENTER

  • MIDDLE_RIGHT

Bottom Row

  • BOTTOM_LEFT

  • BOTTOM_CENTER

  • BOTTOM_RIGHT

Usage

Setting Default Position

In your config.lua:

Config = {
    DefaultPosition = 'TOP_RIGHT',
    -- other config options...
}

Individual Notification Position

exports['b2-sleeknotify']:CreateNotification({
    type = 'success',
    message = 'Custom positioned notification',
    position = 'TOP_CENTER'
})

Position Behavior

  • Notifications stack in order at their designated position

  • Each position maintains its own stack

  • Notifications automatically adjust spacing

  • Smooth animations when notifications are added or removed

Notification Types

B2-SleekNotify provides four distinct notification types, each with its own styling and purpose.

Available Types

Success

  • Color: Green

  • Icon: Checkmark

  • Use for: Successful actions, confirmations

  • Example: "Vehicle stored successfully"

exports['b2-sleeknotify']:CreateNotification({
    type = 'success',
    message = 'Action completed successfully'
})

Error

  • Color: Red

  • Icon: Alert circle

  • Use for: Errors, failures, denied actions

  • Example: "Insufficient permissions"

exports['b2-sleeknotify']:CreateNotification({
    type = 'error',
    message = 'Action failed'
})

Info

  • Color: Blue

  • Icon: Information

  • Use for: General information, neutral messages

  • Example: "Server restarting in 5 minutes"

exports['b2-sleeknotify']:CreateNotification({
    type = 'info',
    message = 'New information available'
})

Warning

  • Color: Amber

  • Icon: Warning triangle

  • Use for: Warnings, cautions, important notices

  • Example: "Low fuel warning"

exports['b2-sleeknotify']:CreateNotification({
    type = 'warning',
    message = 'Warning message'
})

Styling Details

Each type has consistent styling across both minimal and advanced modes:

Minimal Style

  • Colored left border

  • Matching icon color

  • Clean white text

Advanced Style

  • Colored gradient background

  • Matching icon in container

  • Enhanced visual presence

Last updated