Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Roblox/roact
A view management library for Roblox Lua similar to React
https://github.com/Roblox/roact
lua react roblox ui
Last synced: 19 days ago
JSON representation
A view management library for Roblox Lua similar to React
- Host: GitHub
- URL: https://github.com/Roblox/roact
- Owner: Roblox
- License: apache-2.0
- Archived: true
- Created: 2017-11-03T18:29:50.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-12-13T00:17:58.000Z (11 months ago)
- Last Synced: 2024-10-01T16:21:48.105Z (about 1 month ago)
- Topics: lua, react, roblox, ui
- Language: Lua
- Homepage: https://roblox.github.io/roact
- Size: 1.04 MB
- Stars: 564
- Watchers: 27
- Forks: 143
- Open Issues: 70
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-roblox - Roact
- awesome-roku - roact - A React-inspired design pattern for building UI components. (Frameworks)
README
> This repository is deprecated and no longer maintained.
>
> See [react-lua](https://github.com/Roblox/react-lua) for our currently maintained React in Lua library.Roact
## Installation
### Method 1: Model File (Roblox Studio)
* Download the `rbxm` model file attached to the latest release from the [GitHub releases page](https://github.com/Roblox/Roact/releases).
* Insert the model into Studio into a place like `ReplicatedStorage`### Method 2: Filesystem
* Copy the `src` directory into your codebase
* Rename the folder to `Roact`
* Use a plugin like [Rojo](https://github.com/LPGhatguy/rojo) to sync the files into a place## [Documentation](https://roblox.github.io/roact)
For a detailed guide and examples, check out [the official Roact documentation](https://roblox.github.io/roact).```lua
local LocalPlayer = game:GetService("Players").LocalPlayerlocal 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](LICENSE.txt) for details.