Skip to main content

Quick Start

exports.lation_ui:showText({
    description = 'Press to interact with this object',
    keybind = 'E',
    icon = 'fas fa-hand-paper'
})

Functions

Display a text UI element to the player.
exports.lation_ui:showText(data)
Parameters:
  • data (table) - Text UI configuration object (see Options)
Hide the currently displayed text UI.
exports.lation_ui:hideText()
Check if a text UI is currently open.
local isOpen, displayText = exports.lation_ui:isOpen()
Returns:
  • isOpen (boolean) - true if text UI is open, false otherwise
  • displayText (string | nil) - The currently displayed text, or nil if not open

Configuration

Options

title
string
Text UI title
Either title, description, or options is required
description
string
Main text content (supports markdown)
Either title, description, or options is required
position
string
default:"right-center"
Text UI position on screenAvailable options: 'top-left', 'top-center', 'top-right', 'left-center', 'center', 'right-center', 'bottom-left', 'bottom-center', 'bottom-right'
icon
string
FontAwesome icon class
iconColor
string
default:"#71717A"
Icon color (hex or CSS color name)
iconAnimation
string
Icon animation typeAvailable options: 'spin', 'spinPulse', 'spinReverse', 'pulse', 'beat', 'fade', 'beatFade', 'bounce', 'shake'
keybind
string
Keybind text to display
options
table
Array of option items for multi-option display (see Items)
bgColor
string
default:"#1E1F24"
Background color (hex or CSS color name)
txtColor
string
default:"#E4E4E7"
Text color (hex or CSS color name)

Items

When using the options parameter, each item in the array supports:
label
string
required
Option label text (supports markdown)
icon
string
FontAwesome icon class
iconColor
string
Icon color (hex or CSS color name)
Inherits from main icon color if not specified
iconAnimation
string
Icon animation typeAvailable options: 'spin', 'spinPulse', 'spinReverse', 'pulse', 'beat', 'fade', 'beatFade', 'bounce', 'shake'
keybind
string
Keybind text for this option

Preview

Text UI Example
Text UI Multi-Option Example