lation scripts
scriptsmembershipdocs
see the scripts
Skip to Content
lation ui
ThemingConfigurationChangelog

Developer API

Shared optionsNotificationsProgress barAlert dialogInput dialogContext menuList menuRadial menuText UITimelineDrawerMinigames
lation interact
lation banking
lation shops
lation jobs
lation weed
lation chop shop

classics

money laundering
drug sales
coke processing
meth crafting
metal detecting
scuba diving
lation ui

Drawer

Slide a lation ui drawer in from the side or bottom of the screen with text, callouts, key-value rows, images and action buttons, then update or close it.

A drawer is a panel that slides in from the left, right or bottom edge. It holds Markdown text and sections (callouts, key-value rows with bars, images and dividers), plus action buttons that trigger events. One drawer shows at a time; showing a different id replaces it.

An interactive drawer (the default) shows the cursor for its buttons while the player keeps moving, with the camera, firing, melee and the pause menu blocked. A drawer with canClose = false takes no focus at all, so it can sit on screen beside other UI.

A 1920 by 1080 screen with the Skills drawer docked along its right edge, full height: Skills, Level 24, 3 points available; a blue info callout, Spend your points; Lockpicking, Level 3, with a blue bar; Driving, Level 5, with a full green bar; a divider; a Criminal heading over a line of text; and Reset and Confirm buttons at the bottom of the screen
The Skills example, docked on the right

showDrawer

Client export

local shown = exports.lation_ui:showDrawer(data)

Parameters

data.idstring
The drawer's id, used by the other exports
data.titlestringoptional
The header's title
data.subtitlestringoptional
A line under the title
data.iconstringoptional
The header's icon
data.iconColorstringoptional
The header icon's color. The theme's icon color by default.
data.iconAnimationstringoptional
See icon animations
data.contentstringoptional
Markdown text shown above the sections
data.sectionstableoptional
The list of sections
data.positionstringoptionaldefault 'right'
'left', 'right' or 'bottom'. Side drawers are full height; a bottom drawer is full width and up to half the screen tall.
data.sizestringoptionaldefault 'md'
A side drawer's width: 'sm', 'md' or 'lg'
data.backdropbooleanoptionaldefault false
Darkens the screen behind the drawer
data.canClosebooleanoptionaldefault true
Shows the close button and the actions, and lets Escape close it. When false, only your script can close it, and actions aren't shown.
data.actionstableoptional
Buttons in the footer. See actions.

Returns

boolean
true when shown; false if there's no id, or none of title, subtitle, content and sections is set

title, subtitle, content, text sections, callouts and image captions take text formatting.

Sections

Each section is a table with a type:

TypeFieldsShows
textcontentA block of Markdown text.
calloutdescription (required), label, calloutType ('info', 'success', 'warning' or 'error', default 'info'), iconA highlighted note, like the alert dialog's callouts.
keyValueitems: a list of { label, value, progress, progressColor }Label and value rows. progress (0 to 100) adds a bar under the row; colorScheme works in place of progressColor.
imagesrc (required), alt, captionA full-width image with an optional caption.
dividerA horizontal line.

Actions

FieldTypeDefaultDescription
labelstringRequired. The button's text.
iconstringAn icon before the text.
variantstring'default''default', 'primary' (success colors) or 'destructive' (error colors).
eventstringA client event to trigger, with args.
serverEventstringA server event to trigger, with args.
argsanyPassed to the events.
closebooleantruefalse keeps the drawer open after the button is pressed.

With one or two actions the buttons sit side by side; with three or more they stack.

hideDrawer

Client export

local hidden = exports.lation_ui:hideDrawer(id)

Parameters

idstringoptional
Close only if this drawer is the one showing. Without it, closes whichever drawer is open.

Returns

boolean
true if it closed one

updateDrawer

Client export

local updated = exports.lation_ui:updateDrawer(id, data)

Parameters

idstring
The id of the drawer on screen
datatable
The fields to change. Only the fields you pass change.

Returns

boolean
false if the drawer with that id isn't showing

isDrawerOpen

Client export

local open = exports.lation_ui:isDrawerOpen(id)

Parameters

idstringoptional
A drawer's id

Returns

boolean
With an id, whether that drawer is showing; without one, whether any drawer is showing
client.lua
-- /skills opens the drawer, or closes it when it's already open
RegisterCommand('skills', function()
    if exports.lation_ui:isDrawerOpen('skills') then
        exports.lation_ui:hideDrawer('skills')
    else
        OpenSkillsDrawer()
    end
end, false)

Example

client.lua
exports.lation_ui:showDrawer({
    id = 'skills',
    title = 'Skills',
    subtitle = 'Level 24, 3 points available',
    icon = 'fas fa-bolt',
    iconColor = '#3B82F6',
    position = 'right',
    size = 'lg',
    backdrop = true,
    sections = {
        {
            type = 'callout',
            calloutType = 'info',
            label = 'Spend your points',
            description = 'Progress saves when you confirm. A reset costs **$2,500**.'
        },
        {
            type = 'keyValue',
            items = {
                { label = 'Lockpicking', value = 'Level 3', progress = 75, progressColor = '#3B82F6' },
                { label = 'Driving', value = 'Level 5', progress = 100, progressColor = '#10B981' }
            }
        },
        { type = 'divider' },
        { type = 'text', content = '### Criminal\n**Lockpicking** opens vehicles and doors faster.' }
    },
    actions = {
        {
            label = 'Reset',
            icon = 'fas fa-rotate-left',
            variant = 'destructive',
            event = 'my_skills:reset',
            close = false
        },
        {
            label = 'Confirm',
            icon = 'fas fa-check',
            variant = 'primary',
            serverEvent = 'my_skills:save',
            args = { lockpicking = 3, driving = 5 }
        }
    }
})

AddEventHandler('my_skills:reset', function()
    exports.lation_ui:updateDrawer('skills', { subtitle = 'Level 24, 5 points available' })
end)

Still stuck? Ask in our Discord: the people who write the scripts answer.

Last updated November 9, 2026

Timeline

Show a lation ui timeline of tasks on screen, then update task status, add tasks or change its header while it's showing.

Minigames

Run lation ui's skill check, signal breach and pattern lock minigames with preset or custom difficulty, and cancel or check them from your script.

On this page

showDrawerSectionsActionshideDrawerupdateDrawerisDrawerOpenExample
lation scripts

FiveM scripts for Qbox, QBCore and ESX servers, made to look and work like one product.

store

  • all scripts
  • membership
  • classics

help

  • docs
  • discord
  • email support

legal

  • terms
  • refunds
  • privacy
© 2026 Lation Labslationscripts.com
  • home
  • scripts
  • membership
  • docs