Events
The window events of TopXBridge, with their arguments and an example
2 min read · Updated Dec 3, 2026
TopXBridge is a library and has no exports: a script loads it and uses TopX.<module> (see the Overview). Its window also listens to three local client events. Inside a TopX script use TopX.notify and TopX.textui, which respect the provider chosen in config.lua. From any other script you can use the events to show the TopX window directly.
Client events
TopXBridge: notify
Shows the TopX notification card.
Side: Client
Fires when: you trigger it.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
kind | string | Yes | success, error or info. |
text | string | Yes | The message. Nothing is shown when it is not a string. |
accent | string | No | Hex colour of the window, for example #327bf7. |
duration | number | No | Milliseconds on screen, 4000 by default. |
How to use it
TriggerEvent('TopXBridge:notify', 'success', 'Package delivered', '#327bf7', 5000)
Good to know
- It is a local event:
TriggerClientEventfrom the server does not reach it. Send your own event to the client and trigger this one there.
TopXBridge: textui
Shows or hides the key prompt, like [E] Open.
Side: Client
Fires when: you trigger it.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
prompt | table or false | Yes | { key: string, text: string } to show it, false to hide it. |
accent | string | No | Hex colour of the window, for example #327bf7. |
How to use it
TriggerEvent('TopXBridge:textui', { key = 'E', text = 'Open the garage' })
TriggerEvent('TopXBridge:textui', false)
TopXBridge: hint
Shows or hides the list of controls used by the placement tool.
Side: Client
Fires when: you trigger it.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
hint | table or false | Yes | { title: string, lines: table } to show it, false to hide it. Each line is a string like **E** Confirm. |
accent | string | No | Hex colour of the window, for example #327bf7. |
How to use it
TriggerEvent('TopXBridge:hint', {
title = 'Placing a zone',
lines = { '**ENTER** Confirm', '**BACKSPACE** Cancel' },
})
TriggerEvent('TopXBridge:hint', false)