181 online 3 members  + Join RP Base  +
FreeScript

zedlib

by atoshit  ·  version 1.3.0  ·  updated 2 days ago

No reviews yet

Downloads
0
Reviews
0
Size
151 KB
Code check
Clean
Licence
MIT
Released
Nov 2026

Zed Library is a comprehensive library built for FiveM, designed to help developers easily create modern, responsive, and high-performance user interfaces direc

zedlib
ZedLib - Modern FiveM UI Library
A production-ready, modular UI library for FiveM featuring a React-based NUI frontend and a clean Lua API. Build beautiful menus, notifications, and dialogs with minimal code.
Table of Contents
  • Features
  • Tech Stack
  • Installation
  • Usage Methods
  • Usage
  • Menus
  • Context Menu
  • Progress Bar
  • Interact
  • Notifications
  • Dialogs
  • Configuration
  • Keyboard and Mouse Navigation
  • Full API Reference
  • Complete Example
  • Development
  • Project Structure
  • License

FeaturesMenu System
  • Fully navigable menus with keyboard and mouse wheel
  • Description option on all items (button, checkbox, list, slider, submenu, category, search, info, separator): when set, a panel below the menu shows that text for the focused item
  • Button, checkbox, list selector, slider, separator, submenu, category, and info items
  • Categories: expand/collapse groups of items in-place (e.g. "Actions on player" → Freeze, Kick, Ban); items can be assigned to a category and only show when it is expanded
  • Info button: hover or focus to show a side panel with label/value pairs (e.g. player name, group, job)
  • Search/filter functionality for large menus
  • Submenu stack navigation with back support
  • Custom accent colors and banner images (default accent: red)
  • Icon support (FontAwesome names or image URLs)
  • Optional category on any item so it appears only when that category is expanded
Notifications
  • Four notification types: success, error, warning, info
  • Optional custom accent color per notification
  • Configurable display duration
  • Optional body message and icon
  • Bulk clear support
  • Black background with colored accent bar and icon badge
Dialogs
  • Input dialogs with field types: text, number, password, textarea
  • Optional accent color and header icon per dialog
  • Confirm/cancel dialogs with one-liner shortcut (with optional color)
  • Customizable buttons with primary, secondary, danger variants and optional icon
  • Field validation (required, maxLength, min/max)
  • Closable toggle
  • Default accent color: red when not specified
Context Menu
  • Entity targeting with ALT key: hold ALT to show cursor, left-click an entity to open context menu
  • Entity highlighting: targeted entities become semi-transparent for visual feedback
  • Camera lock: camera is locked while ALT is held, movement (WASD) remains active
  • Release ALT to close: releasing ALT closes everything instantly
  • Flyout submenus: submenus expand to the right on hover (nested submenus supported)
  • Shine hover effect: items glow with red accent border on hover, consistent with the menu system
  • Register options by entity type: vehicle, ped, player, object, myself, mycar, or all
  • Target yourself: myself type for options on your own character
  • Target your vehicle: mycar type for options on the vehicle you are sitting in (inherits vehicle options)
  • Target a specific entity: entity field to bind options to a single entity handle
  • Target by model/prop: model field to bind options to all props of a given model name or hash
  • Auto-cleanup: options are automatically removed when the resource that registered them stops
Interact
  • Interaction prompt at world coordinates (above peds, doors, etc.)
  • Optional key (e.g. E) displayed in a small box on the left; omit key to show only the label
  • Key press animation on the key box when the player presses the key
  • Dynamic coords: pass a function for moving entities (e.g. ped head)
  • Distance-based visibility and onSelect callback
InteractProgress
  • Same as Interact but hold the key for a duration (ms)
  • Progress bar below the label while holding; onSelect only when full duration complete
  • onCancel when the player releases early or leaves range
Progress Bar
  • Blocking function: returns true (completed) or false (cancelled)
  • Animation support: play animations during the progress (dict + clip)
  • Prop attachment: attach props to the player (model, position, rotation, bone)
  • Cancel support: optional ESC/Backspace cancellation
  • Control disabling: selectively disable movement, vehicle, combat, or mouse controls
  • Uses the global accent color with glow effect
General
  • UI sound effects (hover, select, toggle) with global toggle
  • Smooth animations and hover shine effects
  • Plugin system for extensibility
  • Hot reload dev playground (no FiveM required)
  • Optimized production build
  • Lua API split by component: lua/api/ (menu, notification, dialog, progressbar, context, config, exports)

Tech Stack
Layer, Technology

Frontend, React 19, TypeScript (strict), Vite 6
State, Zustand 5
Styling, TailwindCSS 3
Animation, Framer Motion 11
Backend, FiveM Lua (client-side)

Installation1. Build the UI
cd zedlib/web
npm install
npm run build

2. Add to your FiveM server
Copy the zedlib folder into your server's resources/ directory, then add it to your server.cfg:

ensure zedlib

3. Set up your resource
Option A — Import file (recommended)

Add zedlib as a dependency and include import.lua in your fxmanifest.lua. This gives you the zed.* API with automatic cross-resource callback support:

fx_version 'cerulean'
game 'gta5'

dependencies { 'zedlib' }

shared_scripts {
    '@zedlib/import.lua',
}

client_scripts {
    'client.lua',
}

You can then use the zed.* namespace in your scripts:

zed.CreateMenu("my_menu", "My Menu")

Option B — Exports

Add zedlib as a dependency and call functions through FiveM exports. No extra file needed:

fx_version 'cerulean'
game 'gta5'

dependencies { 'zedlib' }

client_scripts {
    'client.lua',
}

You can then call any function via exports.zedlib:

exports.zedlib:CreateMenu("my_menu", "My Menu")

…