Lua x React Boilerplate
A boilerplate for building FiveM UIs using React (TypeScript or JavaScript) and Lua. This template helps you quickly set up a modern UI for your FiveM scripts, with easy integration between Lua and Re
๐ Features
React Frontend โ Build UIs with React (choose TypeScript or JavaScript).
Lua Integration โ Communicate between your React UI and FiveM Lua scripts.
SCSS Support โ Style your UI with SCSS for advanced styling.
Hot Reload/Dev Server โ Fast development with live reloading.
๐ฆ Installation
Download the Boilerplate:
Visit the GitHub releases page.
Choose your preferred version: TypeScript or JavaScript.
Download and extract to your FiveM resources folder.
Add to
server.cfg:ensure lua-react-boilerplate
โก Quick Start
Install dependencies:
Build or run in dev mode:
Build for production:
Or run the dev server for hot reload:
Create your own components:
Go to
web/src/componentsand add your new component files.Import and use them in
App.tsx(orApp.jsx) inweb/srcto make them visible in your UI.
โ ๏ธ Troubleshooting
If you are having errors, make sure you are NOT running in npm run dev mode. For FiveM to use your latest UI, always run npm run build and use the built files.
๐ File Structure
Last updated