Flux is a utility-first framework designed to simplify and accelerate the process of building UI elements in Roblox. Inspired by utility-first CSS frameworks like Tailwind CSS, this framework provides a set of predefined utility classes to style your Roblox GUIs efficiently.
⚠️ Note: This framework is in its prototype phase, with limited features. Stay tuned for more updates!
.rbxm
file to use in your project.Clone the repository to your Roblox project.
git clone https://github.com/tarekmahmouduix/Flux
.rbxm
fileyou can find the rbxm file in github downloads
let me know if you’d like any further installation methods
to Start using flux, you can use the template down here or by requiring and using the built in function applyStyles
Template:
-- simple app example
local flux = require(game.ReplicatedStorage.flux.core.main)
local ScreenGui = Instance.new("ScreenGui", game.Players.LocalPlayer.PlayerGui)
local newElement = Instance.new("TextLabel", ScreenGui)
newElement.Text = "Hello, Flux!"
flux.applyStyles(newElement, "bg-gray-50 hover:bg-[30,30,30]-transition hover:text-[255,255,255]-transition sx-[30%] sy-[30%] align-center text-2xl font-arial font-bold round-md")
Frame
with the specified utilities. The list of available utilities will expand as the framework evolves.Since this is an early prototype, the framework only supports a limited number of utilities. Some of the basic ones include:
bg-red-500
, bg-gray-50
, etc.s-sm
, s-md
, s-lg
, sx-[(number-here)]
, sy-[(number-here)]
, text-sm
, text-xl
for common UI sizes.hover:
, focus:
align-center
, align-left
, align-right
, etc.font-(font-here)
, font-bold
, font-light
, font-base
, currently supporting about 20 fontsround-xs
, round-sm
, round-lg
, round-xl
, round-2xl
aspect-16-9
, aspect-4-3
, aspect-1-1
hidden
, (to hide objects)hover:
) you can put (-transition
at the end of the state) e.g(hover:bg-[255,255,255]-transition
)When using the class (Align) the gui becomes responsive
//Special Class (focus:) might not work properly
More utilities will be added over time. Feel free to suggest new utilities by opening an issue or contributing!
Want to help build and expand this framework? Check out our CONTRIBUTING.md to learn how you can get involved.
This project is licensed under the MIT License - see the LICENSE file for details.