Rip is currently a PTB, a public testing build, and should not be used in production. Please provide any feedback!
Rip 0.1
;
Rip is a MVC (Model, View, Controller) library that separates the UI design of an app with the actual Lua functionality of an app. Using an incremental dom and signals, Rip’s declarative templates are designed for fast, efficient builds.
A plus of using this library is that, for teams, UI designers can simply create their design’s UI without having to impl. the actual code behind their UI.
Templates
Templates are functions that build components for your app. Simply call Rip.Template(...)
as such:
Rip.Template("TextLabel", {
Size = UDim2.new(1, 0, 1, 0);
Text = "Hello world!"
})
then to add children, you pass a function as the third property calling the child component, as such:
Rip.Template("TextLabel", {
Size = UDim2.new(1, 0, 1, 0);
Text = "Hello world!"
}, function()
Rip.Template("UIScale", {
Scale = 0;
}
end)
Controller
Simply call Rip.Controller.new()
, and extend off of that class. The only function that Rip calls is yourController:init()
on initiation.
Example code:
local cont = Rip.Controller.new();
function cont:init()
print("Controller connected!")
end
To apply the controller to a template, simply call Rip.applyController()
.
To set a ref, accessible through self.target[targetName]
, use Rip.target(targetName)
.
To set data, accessible through self.data[dataName]
, use Rip.data(dataKey, dataValue)
.
For example,
Rip.Template("TextLabel", {
Size = UDim2.new(1, 0, 1, 0);
}, function()
Rip.applyController(clockController);
Rip.target("text")
Rip.data("timezone", "est")
end)
bootstrapApp(renderFunction, renderRoot)
Creates a Rip app. Usage:
Rip.bootstrapApp(function()
appComponent();
end, root)
signals
Docs & info: Signal - a more advanced version of native Roblox signals
Latest update
SOURCE (Rip 0.1):
Rip.rbxm (6.1 KB)