Simple UI Library

Today i have made a simple UI library (not complete). I know things better than this exist, but i just wanted to see peoples feedback on it : )

It comes with 2 files (as of writing):

image
ReplColors and ReplGui

  • ReplColors is for Color Presets
  • ReplGui is responsible for the creation of the gui.

ReplColors is a list of 75 colours.

image

ReplGui on the other hand has 2 functions.

  • GetLastElement(History: Boolean?) - Returns a table or the instance of the last Created Element. If history, then it returns all instances made with ReplGui in a table.

image

  • New(Config: Props): Props - Creates an Instance. Nearly all properties are provided (except read only ones). Other things are there like the ability to just add a UIStroke (and configure it’s properties) along with UiCorners too. (I have no idea if this is efficient cause its a bunch of ‘if’ statements)

If you have any Suggestions / Criticisms for this please let me know

(If it’s a criticism don’t tell me something like this already exists its about the functionality :D)

Things i will do (dont suggest these if possible)
  • Textbox Support (Placeholder Text, etc)

Script Used in Example Shown:
Example.rbxm (6.7 KB)

1 Like

Also if your using this or looking how it works, keep these things in mind.

Frame = Frames
TextBox = TextLabel / Textbox / TextButton
ImageLabel = ImageLabel / ImageButton

image

1 Like

Rather than using ReplColors couldn’t you just use BrickColor.new? I believe to get a BrickColors Color3 value it is

BrickColor.new([[Really Red]]).Color

(Edit: I forgot to read the end part don’t criticize my bad :skull:)


About the ReplUI
It seems pretty good and is a good alternative to react for simplicity but would also be cool if it had something like SwiftUI where you can do

TextLabel
.black()
.textsize(14)

and it will become black and the text size will become 14

1 Like

I believe this is very complicated as only i have seen 1 person do this (as of just searching).

1 Like

the only way i ca think of doing this is by having a function that takes the script as the input, and goes line by line (or at once) and translates the code into lua, then runs it

1 Like

I’ve done this before. All you need to do is add functions that return “self”.

1 Like