What is tLib?
tLib is a shared utility library for FiveM and Helix resources. It provides UI components (menus, dialogs, toasts, themes), reusable Lua import modules (settings, KVP, coords, layouts, move mode), and TypeScript/NUI utilities for resource developers.
It has no configuration — just install it and use it as a dependency.
Features
UI Component Suite
Full NUI-based menu system with submenus and dynamic updates, modal form dialogs with multiple field types, stackable toast notifications, and a CSS variable-based theme system.
Import Modules
Lightweight Lua modules that load on demand — typed KVP storage, settings stores with persistence, vehicle coordinate math, layout discovery, and drag-to-reposition for HUDs.
TypeScript / NUI Utilities
Shared TypeScript packages (@tlib/shared) including a Three.js-based 3D gizmo, undo/redo system, coordinate conversion helpers, and a framework-agnostic drag handler.
Platform Abstraction
Works on both FiveM and Helix through an adapter layer — write once, run on either platform.
