Skip to Content

Exports

🧩
19 Exports — Everything is an export
All UI modules are accessed via exports[‘mizu_interface’]. Zero idle overhead — exports only run when called.

1. Notifications

Trigger detailed notifications with titles, icons, sounds, and animations. The dynamic layouting system handles positioning.

-- Pass a simple string for a quick notification exports['mizu_interface']:Notify('This is a simple notification.')

2. Progress Bar

Handles animations, control locking, cancel-key support, combat/death hooks, dual prop spawning, and animation playback.

exports['mizu_interface']:ProgressBar({ duration = 5000, label = 'Repairing Vehicle...', icon = 'wrench', -- FontAwesome icon (with or without 'fa-' prefix) type = 'success', -- Color from Config.Types canCancel = true, -- Allows cancel via Config.ProgressBar.CancelKeys disable = { movement = true, -- Disable walking (WASD) car = true, -- Disable vehicle controls mouse = false, -- Disable camera combat = true, -- Disable shooting/punching inventory = true -- Disable inventory keys (Tab/F2) }, animation = { animDict = "veh@break_in@0h@p_m_one@", anim = "low_force_entry_ds", flags = 16 -- OR: task = "PROP_HUMAN_BUM_BIN" for a scenario }, prop = { -- First attached prop (Optional) model = 'prop_tool_wrench', bone = 28422, coords = vec3(0.0, 0.0, 0.0), rotation = vec3(0.0, 0.0, 0.0) }, propTwo = { -- Second attached prop (Optional) model = 'prop_tool_spanner', bone = 60309, coords = vec3(0.0, 0.0, 0.0), rotation = vec3(0.0, 0.0, 0.0) }, onFinish = function(isCanceled) if not isCanceled then print("Repair complete!") end end, onCancel = function() -- Optional: separate cancel handler (if set, onFinish is NOT called on cancel) print("Canceled!") end })
ℹ️
Information

Both naming conventions work for disable: movement or disableMovement, car or disableCarMovement, etc.

💡
Tip

The progress bar automatically sets inv_busy for QBCore, QBOX, and Ox Inventory, and auto-cancels on player death.

Cancel Progress

exports['mizu_interface']:CancelProgress()

3. Text UI

A permanent DrawText UI system with a dead-man switch — auto-hides if not refreshed within Config.TextUI.Timeout ms.

-- Key + text exports['mizu_interface']:TextUI('E', 'Interact') -- With type (color from Config.Types) exports['mizu_interface']:TextUI('TAB', 'Open Trunk', 'info') -- With hex color + theme -- Themes: 'split', 'classic', 'solid' exports['mizu_interface']:TextUI('G', 'Open Door', '#2ecc71', 'solid')

Hide Text UI

exports['mizu_interface']:HideTextUI()

4. Skill Check

A promise-based multi-round timing minigame. Blocks the calling thread and returns true or false.

local success = exports['mizu_interface']:SkillCheck('medium') -- Or with keys: SkillCheck('hard', {'E', 'Q'}) if success then print("Passed!") else print("Failed.") end

Cancel Skill Check

exports['mizu_interface']:CancelSkillCheck()

5. Radial Hub

A mathematically perfect SVG Pie Menu. Supports unlimited nested sub-menus via items.

exports['mizu_interface']:OpenRadialHub({ center = { icon = 'user-gear', title = 'ACTIONS' }, slices = { { icon = 'car', title = 'VEHICLE', type = 'info', items = { -- Nested sub-menu { icon = 'key', title = 'LOCK', type = 'success', action = 'vehiclekeys:client:Toggle', actionType = 'client' }, { icon = 'power-off',title = 'ENGINE', type = 'warning', action = 'vehiclekeys:client:ToggleEngine', actionType = 'client' } } }, { icon = 'box', title = 'INVENTORY', type = 'success', action = 'inventory:client:Open', actionType = 'client' }, { icon = 'cogs', title = 'SETTINGS', color = '#ff00ff',action = 'my_settings', actionType = 'client' }, { icon = 'user-lock', title = 'LOCKPICK', type = 'error', action = 'lockpick', actionType = 'command' } } })

Close Radial Menu

exports['mizu_interface']:CloseRadialHub()
ℹ️
Information

Auto-closes when the player dies, starts a progress bar, or has inv_busy active.

Compatibility Stubs

These stubs prevent crashes from scripts that try to interact with native radial menu APIs:

exports['mizu_interface']:AddOption(data) -- Returns a random ID string exports['mizu_interface']:RemoveOption(id) -- Returns true exports['mizu_interface']:setupSubItems(id, items) -- Returns true exports['mizu_interface']:setupAppItems(name, items) -- Returns true

6. Context Menu

A list-based context menu with clickable items and action triggers.

exports['mizu_interface']:OpenContextMenu({ id = 'vehicle_info', title = 'Vehicle Data: Paragon S', theme = 'classic', -- 'classic' or 'solid' position = 'right', -- 'right' or 'left' color = '#3498db', items = { { title = 'Engine Status', description = 'Running', icon = 'car-battery' }, { title = 'Toggle Engine', description = 'Turn engine on/off', icon = 'power-off', action = 'vehicle:client:ToggleEngine', actionType = 'client', -- 'client', 'server', or 'command' args = { vehicleId = 1234 } -- Optional args passed to the event } } })
ℹ️
Alias:

exports['mizu_interface']:openMenu(data) works identically — drop-in compatibility for scripts using other menu libraries.

Close Context Menu

exports['mizu_interface']:CloseContextMenu()

7. Input Dialog

A promise-based input form. Blocks the thread and returns the user’s data or nil if canceled.

local result = exports['mizu_interface']:Input({ header = 'Incident Report', icon = 'file-signature', color = '#0984e3', inputs = { { id = 'suspect', label = 'Suspect Description', type = 'text', placeholder = 'e.g. Red hoodie, mask' }, { id = 'weapon', label = 'Weapon Used', type = 'text', placeholder = 'e.g. Pistol' } } }) if result then print("Suspect: " .. result.suspect) end

8. NPC Dialog

A promise-based branching conversation system. Returns the selected value or nil if closed.

local result = exports['mizu_interface']:Dialog({ npcName = 'Officer Mitchell', job = 'LSPD Patrol', icon = 'shield-alt', color = '#0984e3', interactionMethod = 'both', -- 'keyboard', 'mouse', or 'both' startNode = 'greeting', nodes = { ['greeting'] = { text = "Good evening. How can I help you?", options = { { label = "Report a robbery!", next = 'robbery' }, { label = "Nothing, goodbye.", type = 'close', value = 'cancel' } } }, ['robbery'] = { text = "A robbery? Tell me more.", options = { { label = "At the Vinewood Bank!", type = 'close', value = 'vinewood' }, { label = "Nevermind.", type = 'close', value = 'cancel' } } } } }) if result then print("Dialog result: " .. result) end
💡
Tip

Node options can also trigger events directly via type = 'event' with event and args fields, firing client or server events mid-conversation.


9. Action Panel

A promise-based confirm/decline panel. Returns 'accept' or 'decline'.

local result = exports['mizu_interface']:ActionPanel({ title = 'Bounty Contract', text = 'Accept the tracking contract for $25,000?', icon = 'crosshairs', color = '#e74c3c', acceptLabel = 'Accept', declineLabel = 'Decline', position = 'top-center', -- 'top-center', 'top-right', 'top-left', 'center', 'bottom-center', etc. single = false, -- true = show only the accept button autoAccept = true, -- Auto-accepts after duration duration = 10000 }) if result == 'accept' then print("Contract accepted!") else print("Declined.") end
Last updated on