Text UI

Contextual text displays with markdown support, icons, and keybind indicators

Options

OptionTypeRequiredDefaultDescription
titlestringNonilText UI title
descriptionstringYes*nilMain text content (supports markdown)
positionstringNo'center-left'Position: 'top-left', 'top-center', 'top-right', 'center-left', 'center', 'center-right', 'bottom-left', 'bottom-center', 'bottom-right'
iconstringNonilFontAwesome icon class
iconColorstringNo'#71717A'Icon color (hex)
iconAnimationstringNonilIcon animation: 'spin', 'spinPulse', 'spinReverse', 'pulse', 'beat', 'fade', 'beatFade', 'bounce', 'shake',
keybindstringNonilKeybind text to display

*Either title or description is required.

Markdown

  • Bold text: **text**
  • Italic text: *text*
  • Code text: `text`
  • Line breaks: \n

Functions

-- Show text UI
exports.lation_ui:showText(data)
 
-- Hide text UI
exports.lation_ui:hideText()
 
-- Check if text UI is open
local isOpen, displayText = exports.lation_ui:isOpen()

Return Values

  • isOpen(): isOpen (boolean), displayText (string or nil)

Example

-- Basic text UI
exports.lation_ui:showText({
    description = 'This is a *simple* message with **formatting**'
})
-- Customized text UI prompt
exports.lation_ui:showText({
    title = 'Interaction Available',
    description = 'Press to interact with this object',
    keybind = 'E',
    icon = 'fas fa-hand-paper',
    iconColor = '#3B82F6'
})
-- Check if text UI is open
local isOpen, text = exports.lation_ui:isOpen()
if isOpen then
    print('Text UI is open & currently displaying:', text)
end