Start with CoraUI - hoyame/coraui GitHub Wiki
Welcome to the FiveM-CoraUI wiki! 😎
This library is for FiveM only, it can be used in Lua, JavaScript or TypeScript
Installation for JavaScript / TypeScript
Here are the instructions to download and prepare the menu on windows !
(step by step)
git clone https://github.com/hoyame/FiveM-CoraUI
cd FiveM-CoraUI
npm install
npm run dev
JavaScript / TypeScript Developement
If you are developing in JavaScript or TypeScript, this menu library can make your life easier !
Here are some examples :
- To create a Menu : To create a menu you first need to export CoraUI in your JavaScript/TypeScript file.
import { CoraUI } from "./index"
Then you need to actually create it !
Here is a blank menu :
CoraUI.openMenu({
name: 'Menu Title',
subtitle: "Menu Subtitle",
glare: true,
buttons: [
],
submenus: {
}
})
if everything went well, you should have this result
- To create a Button : In the buttons array
Images : A simple button and a "full" button
// Simple button :
{ name: 'Simple button', onClick: () => console.log("Simple Button !")},
// A "Full" Button
{ name: 'Button', description: "My description !", rightText: "Hey !", backgroundColor: [255, 0, 0], onClick: () => {
console.log("Hey")
}},