GithubHelp home page GithubHelp logo

classicvalues / roact Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roblox/roact

0.0 1.0 0.0 1.07 MB

A view management library for Roblox Lua similar to React

Home Page: https://roblox.github.io/roact

License: Apache License 2.0

Lua 99.78% Shell 0.22%

roact's Introduction

Roact

GitHub Actions Build Status Coveralls Coverage Documentation
A declarative UI library for Roblox Lua inspired by React.
ย 

Installation

Method 1: Model File (Roblox Studio)

  • Download the rbxm model 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 src directory into your codebase
  • Rename the folder to Roact
  • Use a plugin like Rojo to sync the files into a place

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.

roact's People

Contributors

lpghatguy avatar zotethemighty avatar amaranthinecodices avatar jeparlefrancais avatar conorgriffin37 avatar misteruncloaked avatar oltrep avatar dougbankspersonal avatar yjia2 avatar cliffchapmanrbx avatar matthargett avatar quenty avatar chriscerie avatar crossstarcross avatar mastermarkus avatar howmanysmall avatar chasedig avatar kampfkarren avatar idiomic avatar rimuy avatar psewell avatar ok-nick avatar michaelmcdonnell avatar malikidreeshasankhan avatar magimaster avatar logandark avatar nobledraconian avatar jmargh avatar darraghgriffin avatar bliang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.