Client

Client Exports

MAD Tablet – Client-Side Exports

Documentation of all client-side exports available in the mad-tablet resource.


📱 Core Tablet Functions

RegisterApp(appConfig)

Registers an external application in the tablet system.

Parameters

{
    id = string,               -- Required: Unique app identifier
    name = string,             -- Required: App display name
    icon = string,             -- Optional: Material Icons name (default: 'apps')
    color = string,            -- Optional: Hex color (default: '#6366f1')
    resourceName = string,     -- Optional: Resource name (default: invoking resource)
    isVisible = function       -- Optional: Returns boolean to control visibility
}

Returns

  • booleantrue if registration was successful

Example


UnregisterApp(appId)

Removes an app from the tablet.

Parameters

  • appId (string)

Returns

  • boolean

Example


IsTabletOpen()

Checks if the tablet is currently open.

Returns

  • boolean


OpenTablet()


CloseTablet()


OpenApp(appId)

Opens a specific app. Automatically opens the tablet if closed.


SendMessage(action, data)

Sends a general message to the tablet React UI.


sendReactMessage(params)

Sends a message to a specific app iframe.

Parameters

Returns

  • boolean

Example

⚠️ Important: iframeId must exactly match the id used in RegisterApp.


🔔 ShowNotification(title, message, color, autoClose)

Displays a tablet notification.

Parameters

  • title (string, optional)

  • message (string)

  • color (string, optional, default: blue)

  • autoClose (number | false, default: 5000)


👥 Groups (Client)

GetGroupID()


IsGroupLeader()

Last updated