FiveM UI Template

A simple, modular template for building in-game UIs in FiveM using HTML, CSS, and JavaScript. The included UIManager class lets you create and control UI elements dynamicallyโ€”no manual HTML editing required.


๐Ÿš€ Features

  • Dynamic UI Creation โ€“ Build UIs in JavaScript, not HTML.

  • NUI Callbacks โ€“ Easily send/receive events between your UI and FiveM.

  • Automatic Close Buttons โ€“ Built-in support for closing UIs.

  • Custom Styles โ€“ Add your own CSS for full customization.


๐Ÿ“ฆ Installation

  1. Clone or Download:

    git clone https://github.com/your-repo-name/FiveM-UI-Template.git
  2. Move to Your Resources Folder:

    mv FiveM-UI-Template your-fivem-server/resources/
  3. Add to server.cfg:

    ensure fivem-html-boilerplate

๐Ÿ“‚ File Structure

FiveM-UI-Template/
โ”‚โ”€โ”€ fxmanifest.lua       # Resource manifest
โ”‚โ”€โ”€ html/
โ”‚   โ”œโ”€โ”€ index.html       # UI entry point
โ”‚   โ”œโ”€โ”€ custom.css       # Your styles
โ”‚   โ”œโ”€โ”€ main.js          # Your scripts
โ”‚   โ”œโ”€โ”€ ui.js            # UIManager class
โ”‚โ”€โ”€ client.lua           # FiveM client events
โ”‚โ”€โ”€ README.md            # Documentation

For FiveM integration details, see Integration.md.

Last updated