Skip to Content

Progress

Timed progress bars and circles with animations, prop attachments, and input control.

Client Exports

progressBar

Show a linear progress bar.

local completed = exports['trinity-ui']:progressBar(data)

progressCircle

Show a circular progress indicator.

local completed = exports['trinity-ui']:progressCircle(data)

showProgress

Generic progress display — use the type property to choose bar or circle.

local completed = exports['trinity-ui']:showProgress(data)

All three are awaitable and return true on completion or false if cancelled.

Properties:

PropertyTypeDefaultDescription
titlestringProgress label (alias: label)
descriptionstringSecondary text
iconstringIconify icon name
durationnumberDuration in milliseconds
percentagenumberStatic percentage (0-100)
typestring'bar''bar' | 'circle' (for showProgress)
minimalbooleanCompact display
segmentsnumberNumber of progress segments
canCancelbooleanfalseAllow cancellation with X key
useWhileDeadbooleanfalseAllow while player is dead
allowRagdollbooleanfalseAllow while ragdolling
allowCuffedbooleanfalseAllow while cuffed
allowFallingbooleanfalseAllow while falling
allowSwimmingbooleanfalseAllow while swimming
disabletableInput disabling options (see below)
animtableAnimation to play during progress
proptable | table[]Prop(s) to attach to player

Disable Options:

disable = { mouse = true, -- Disable mouse look move = true, -- Disable movement sprint = true, -- Disable sprinting car = true, -- Disable vehicle controls combat = true -- Disable combat }

Animation:

anim = { dict = 'amb@prop_human_bbq@male@base', -- Animation dictionary clip = 'base', -- Animation clip name flag = 49 -- Animation flag (default 49) } -- OR use a scenario: anim = { scenario = 'PROP_HUMAN_BBQ' }

Props:

prop = { model = 'prop_tool_hammer', -- Prop model name or hash bone = 60309, -- Bone index (default: right hand) pos = vector3(0.0, 0.0, 0.0), -- Position offset rot = vector3(0.0, 0.0, 0.0) -- Rotation offset } -- Multiple props: prop = { { model = 'prop_tool_hammer', bone = 60309, pos = vec3(0.0, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) }, { model = 'prop_tool_wrench', bone = 28422, pos = vec3(0.0, 0.0, 0.0), rot = vec3(0.0, 0.0, 0.0) } }

updateProgress

Update the percentage of an active progress display.

exports['trinity-ui']:updateProgress(percentage)

cancelProgress

Cancel the active progress display.

exports['trinity-ui']:cancelProgress()

isProgressActive

Check if a progress display is currently active.

local active = exports['trinity-ui']:isProgressActive()

Example

-- Simple progress bar local success = exports['trinity-ui']:progressBar({ title = 'Repairing Vehicle', duration = 8000, canCancel = true, disable = { move = true, combat = true }, anim = { dict = 'mini@repair', clip = 'fixing_a_player' }, prop = { model = 'prop_tool_wrench', bone = 60309, pos = vec3(0.0, 0.0, -0.03), rot = vec3(-90.0, 0.0, 0.0) } }) if success then print('Vehicle repaired!') else print('Repair cancelled.') end
-- Circle progress exports['trinity-ui']:progressCircle({ title = 'Searching...', duration = 5000, icon = 'fa6-solid:magnifying-glass' })

The cancel keybind is X by default and can be rebound by the player through FiveM’s keybind settings.

Last updated on