search/
Start typing to search packages!
package_2
roact
By @zxibs
Roblox
MirroredRoact
A declarative UI library for Roblox Lua inspired by React.
Installation
Method 1: Model File (Roblox Studio)
- Download the
rbxmmodel file attached to the latest release from the GitHub releases page. - Insert the model into Studio into a place like
ReplicatedStorage
Method 2: Filesystem
- Copy the
srcdirectory into your codebase - Rename the folder to
Roact - Use a plugin like Rojo to sync the files into a place
Documentation
For a detailed guide and examples, check out the official Roact documentation.
local LocalPlayer = game:GetService("Players").LocalPlayer
local Roact = require(Roact)
-- Create our virtual tree describing a full-screen text label.
local tree = Roact.createElement("ScreenGui", {}, {
Label = Roact.createElement("TextLabel", {
Text = "Hello, world!",
Size = UDim2.new(1, 0, 1, 0),
}),
})
-- Turn our virtual tree into real instances and put them in PlayerGui
Roact.mount(tree, LocalPlayer.PlayerGui, "HelloWorld")
License
Roact is available under the Apache 2.0 license. See LICENSE.txt for details.
Package Details
Install command (Click to copy)
Version
1.4.0
License
Apache-2.0
Safe for commercial use
Modified files must carry a notice of changes. If the package ships a NOTICE file, its attributions must be preserved.
Automated license review — not legal advice.
