Skip to main content

Plasma

Functions

automaticSize

utilities
Plasma.automaticSize(
containerGuiObject,--

The instance to apply automatic sizing to.

options{
axisEnum.AutomaticSize,
maxSizeVector2 | UDim2,
minSizeVector2
} | nil
) → ()

Applies padding-aware automatic size to the given GUI instance. This function sets up events to listen to further changes, so should only be called once per object.

Also supports ScrollingFrames by correctly clamping actual and canvas sizes.

note

If this function is called from the server, if maxSize is a UDim2, because of differing screen sizes, it instead configures the instance to be compatible with the Plasma.hydrateAutomaticSize function, adding the CollectionService tag and other attributes.

You must also call hydrateAutomaticSize once on the client for this to work.

::warning There is currently no way to undo this other than destroying the instance. Once automatic sizing has been applied, it is always applied to that instance. :::

create

utilities
Plasma.create(
classNamestring,--

The class name of the Instance to create

propsCreateProps
) → Instance--

The created instance

A function that creates an Instance tree.

CreateProps is a table:

  • String keys are interpreted as properties to set
  • Numerical keys are interpreted as children
  • Function values are interpreted as event handlers
  • Table keys can be used to get references to instances deep in the tree, the value becomes the key in the table

This function doesn't do anything special. It just creates an instance.

create("Frame", {
	BackgroundTransparency = 1,
	Name = "Checkbox",

	create("TextButton", {
		BackgroundColor3 = Color3.fromRGB(54, 54, 54),
		Size = UDim2.new(0, 30, 0, 30),

		create("UICorner", {
			CornerRadius = UDim.new(0, 8),
		}),

		Activated = function()
			setClicked(true)
		end,
	}),
})

Getting references to instances deep in a tree:

local ref = {}

create("Frame", {
	create("TextButton", {
		[ref] = "button",
		Text = "hi"
	})
})

print(ref.button.Text) --> hi

hydrateAutomaticSize

This item only works when running on the client. Clientutilities
Plasma.hydrateAutomaticSize() → RBXScriptConnection

Applies automatic sizing to any current or future instances in the DataModel that are tagged with "PlasmaAutomaticSize". Attributes axis (string) and maxSize (UDim2 or Vector2) are allowed.

new

Plasma.new(
rootInstanceInstance--

The root instance of which to mount all children. Likely a ScreenGui.

) → Node--

An opaque object which holds persistent state about your UI.

createContext

Plasma.createContext(
namestring--

The human-readable name of the context. This is only for debug purposes.

) → Context--

An opqaue Context object which holds persistent state.

Creates a [Context] object which is used to pass state downwards through the tree without needing to thread it through every child as props.

useContext

hooks
Plasma.useContext(
contextContext--

A context object previously created with createContext

) → T

Returns the value of this context provided by the most recent ancestor that used provideContext with this context.

provideContext

Plasma.provideContext(
contextContext,--

A context object previously created with createContext

valueT--

Any value you want to provide for this context

) → ()

Provides a value for this context for any subsequent uses of useContext in this scope.

useEffect

hooks
Plasma.useEffect(
callback() → () | () → () → (),--

A callback function that optionally returns a cleanup function

...any--

Dependencies

) → ()

useEffect takes a callback as a parameter which is then only invoked if passed dependencies are different from the last time this function was called. The callback is always invoked the first time this code path is reached.

If no dependencies are passed, the callback only runs once.

This function can be used to skip expensive work if none of the dependencies have changed since the last run. For example, you might use this to set a bunch of properties in a widget if any of the inputs change.

useState

hooks
Plasma.useState(
initialValueT--

The value this hook returns if the set callback has never been called

) → (
T,--

The previously set value, or the initial value if none has been set

(newValueT) → ()--

A function which when called stores the value in this hook for the next run

)
local checked, setChecked = useState(false)

useInstance(function()
	local TextButton = Instance.new("TextButton")

	TextButton.Activated:Connect(function()
		setChecked(not checked)
	end)

	return TextButton
end)

TextButton.Text = if checked then "X" else ""

useKey

Plasma.useKey(keystring | number) → ()

Specify a key by which to store all future state in this scope. This is similar to React's key prop.

This is important to use to prevent state from one source being still being applied when it should actually reset.

useInstance

hooks
Plasma.useInstance(
creator(ref{}) → ()--

A callback which creates the widget and returns it

) → Instance--

Returns the instance returned by creator

useInstance takes a callback which should be used to create the initial UI for the widget. The callback is only ever invoked on the first time this widget runs and never again. The callback should return the instance it created. The callback can optionally return a second value, which is the instance where children of this widget should be placed. Otherwise, children are placed in the first instance returned.

useInstance returns the ref table that is passed to it. You can use this to create references to objects you want to update in the widget body.

start

Plasma.start(
rootNodeNode,--

A node created by Plasma.new.

fn(...T) → (),
...T--

Additional parameters to callback

) → ()

Begins a new frame for this Plasma instance. The callback is invoked immediately. Code run in the callback function that uses plasma APIs will be associated with this Plasma node. The callback function is not allowed to yield.

If this function is used, Plasma.beginFrame, Plasma.continueFrame, and Plasma.finishFrame should not be used.

beginFrame

Plasma.beginFrame(
rootNodeNode,--

A node created by Plasma.new.

fn(...T) → (),
...T--

Additional parameters to callback

) → ContinueHandle--

A handle to pass to continueFrame

Begins a continuable Plasma frame. Same semantics as Plasma.start.

For a frame:

  • Call beginFrame once.
  • Call continueFrame any number of times.
  • Call finishFrame when the frame is complete.

If this function is used, Plasma.start should not be used.

finishFrame

Plasma.finishFrame(
rootNodeNode--

A node created by Plasma.new.

) → ()

Finishes a continuable Plasma frame, cleaning up any objects that have been removed since the last frame.

continueFrame

Plasma.continueFrame(
continueHandleContinueHandle,--

An object returned by Plasma.start

fn(...T) → (),
...T--

Additional parameters to callback

) → ()

Continue the Plasma frame with a new handler function. Calling this will not trigger any cleanup that typically happens every frame.

This is intended to be used to continue creating UI within the same frame that you started on. You should call Plasma.beginFrame once per frame, then Plasma.continueFrame any number of times after that, finally calling Plasma.finishFrame.

scope

Plasma.scope(
fn(...T) → (),
...T--

Additional parameters to callback

) → ()

Begins a new scope. This function may only be called within a Plasma.start callback. The callback is invoked immediately.

Beginning a new scope associates all further calls to Plasma APIs with a nested scope inside this one.

widget

Plasma.widget(
fn(...T) → ()--

The widget function

) → (...T) → ()--

A function which can be called to create the widget

This function takes a widget function and returns a function that automatically starts a new scope when the function is called.

useStyle

style
Plasma.useStyle() → ()

Returns the current style information, with styles that are set more recently in the tree overriding styles that were set further up. In this way, styles cascade downwards, similar to CSS.

setStyle

style
Plasma.setStyle(
styleFragment{[string]any}--

A dictionary of style information

) → ()

Defines style for any subsequent calls in this scope. Merges with any existing styles.

arrow

widgets
Plasma.arrow(
fromVector3 | CFrame | BasePart,
toVector3 | BasePart | nil,
colorColor3?--

Optional color. Random if not specified.

) → ()
  • arrow(from: Vector3, to: Vector3) -> Creates an arrow between from and to
  • arrow(point: Vector3) -> Creates an arrow pointing at point
  • arrow(cframe: CFrame) -> Creates an arrow with its point at the CFrame position facing the CFrame LookVector
  • arrow(part: BasePart) -> Arrow represents the Part's CFrame
  • arrow(fromPart: BasePart, toPart: BasePart) -> Arrow between the two parts

Arrows

Plasma.arrow(Vector3.new(0, 0, 0))
Plasma.arrow(Vector3.new(5, 5, 5), Vector3.new(10, 10, 10))

blur

widgets
Plasma.blur(
sizenumber--

The size of the blur

) → ()

A blur effect in the world. Created in Lighting.

button

widgets
Plasma.button(
labelstring--

The label for the checkbox

) → ButtonWidgetHandle

A text button.

Returns a widget handle, which has the field:

  • clicked, a function you can call to check if the checkbox was clicked this frame

A button

Plasma.window("Button", function()
	if Plasma.button("button text"):clicked() then
		print("clicked!")
	end
end)

checkbox

widgets
Plasma.checkbox(
labelstring,--

The label for the checkbox

options{
disabledboolean,
checkedboolean
}
) → CheckboxWidgetHandle

A checkbox. A checkbox may either be controlled or uncontrolled.

By passing the checked field in options, you make the checkbox controlled. Controlling the checkbox means that the checked state is controlled by your code. Otherwise, the controlled state is controlled by the widget itself.

Returns a widget handle, which has the fields:

  • checked, a function you can call to check if the checkbox is checked
  • clicked, a function you can call to check if the checkbox was clicked this frame

Checkboxes

Plasma.window("Checkboxes", function()
	if Plasma.checkbox("Controlled checkbox", {
		checked = checked,
	}):clicked() then
		checked = not checked
	end

	Plasma.checkbox("Disabled checkbox", {
		checked = checked,
		disabled = true,
	})

	Plasma.checkbox("Uncontrolled checkbox")
end)

heading

widgets
Plasma.heading(
textstring,
options?{fontFont}
) → ()

Text, but bigger!

highlight

Plasma.highlight(
adorneeInstance,
options?HighlightOptions
) → ()

Types

interface HighlightOptions {
outlineColor?:Color3
fillColor?:Color3
fillTransparency?:number
outlineTransparency?:number
fillMode?:HighlightFillMode
}

Creates a highlight over an instance with the specified options, using the Roblox Highlight instance

label

widgets
Plasma.label(textstring) → ()

Text.

portal

widgets
Plasma.portal(
targetInstanceInstance,--

Where the portal goes to

children() → ()--

Children

) → ()

The portal widget creates its children inside the specified targetInstance. For example, you could use this to create lighting effects in Lighting as a widget:

return function(size)
	portal(Lighting, function()
		useInstance(function()
			local blur = Instance.new("BlurEffect")
			blur.Size = size
			return blur
		end)
	end)
end

row

widgets
Plasma.row(
options{paddingVector2},
children() → ()--

Children

) → ()

Lays out children horizontally

space

Plasma.space(sizenumber) → ()

Blank space of a certain size.

spinner

widgets
Plasma.spinner() → ()

A spinner widget, indicating loading.

A spinner

table

widgets
Plasma.table(
items{{string}},
options{
marginTop?number,
selectable?boolean,
font?Font,
headings?boolean
}
) → ()

A table widget. Items is a list of rows, with each row being a list of cells.

local items = {
	{"cell one", "cell two"},
	{"cell three", "cell four"}
}

Table

window

widgets
Plasma.window(
optionsstring | WindowOptions,--

The title of the window, or options

children() → ()--

Children

) → WindowWidgetHandle

Types

interface WindowOptions {
title?string
closable?boolean
movable?boolean
resizable?boolean
}

A window widget. Contains children.

  • Closable
  • Draggable
  • Resizable

Returns a widget handle, which has the field:

  • closed, a function you can call to check if the close button was clicked.

Window with checkboxes

Show raw api
{
    "functions": [
        {
            "name": "automaticSize",
            "desc": "Applies padding-aware automatic size to the given GUI instance. This function sets up events to listen to further changes, so\nshould only be called once per object.\n\nAlso supports ScrollingFrames by correctly clamping actual and canvas sizes.\n\n:::note\nIf this function is called from the server, if `maxSize` is a UDim2, because of differing screen sizes, it instead\nconfigures the instance to be compatible with the [Plasma.hydrateAutomaticSize] function, adding the\nCollectionService tag and other attributes.\n\nYou must also call `hydrateAutomaticSize` once on the client for this to work.\n:::\n\n::warning\nThere is currently no way to undo this other than destroying the instance. Once automatic sizing has been applied,\nit is always applied to that instance.\n:::",
            "params": [
                {
                    "name": "container",
                    "desc": "The instance to apply automatic sizing to.",
                    "lua_type": "GuiObject"
                },
                {
                    "name": "options",
                    "desc": "",
                    "lua_type": "{ axis: Enum.AutomaticSize, maxSize: Vector2 | UDim2, minSize: Vector2 } | nil"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "utilities"
            ],
            "source": {
                "line": 146,
                "path": "src/automaticSize.lua"
            }
        },
        {
            "name": "create",
            "desc": "A function that creates an Instance tree.\n\nCreateProps is a table:\n- String keys are interpreted as properties to set\n- Numerical keys are interpreted as children\n- Function values are interpreted as event handlers\n- Table keys can be used to get references to instances deep in the tree, the value becomes the key in the table\n\nThis function doesn't do anything special. It just creates an instance.\n\n```lua\ncreate(\"Frame\", {\n\tBackgroundTransparency = 1,\n\tName = \"Checkbox\",\n\n\tcreate(\"TextButton\", {\n\t\tBackgroundColor3 = Color3.fromRGB(54, 54, 54),\n\t\tSize = UDim2.new(0, 30, 0, 30),\n\n\t\tcreate(\"UICorner\", {\n\t\t\tCornerRadius = UDim.new(0, 8),\n\t\t}),\n\n\t\tActivated = function()\n\t\t\tsetClicked(true)\n\t\tend,\n\t}),\n})\n```\n\nGetting references to instances deep in a tree:\n\n```lua\nlocal ref = {}\n\ncreate(\"Frame\", {\n\tcreate(\"TextButton\", {\n\t\t[ref] = \"button\",\n\t\tText = \"hi\"\n\t})\n})\n\nprint(ref.button.Text) --> hi\n```",
            "params": [
                {
                    "name": "className",
                    "desc": "The class name of the Instance to create",
                    "lua_type": "string"
                },
                {
                    "name": "props",
                    "desc": "",
                    "lua_type": "CreateProps"
                }
            ],
            "returns": [
                {
                    "desc": "The created instance",
                    "lua_type": "Instance"
                }
            ],
            "function_type": "static",
            "tags": [
                "utilities"
            ],
            "source": {
                "line": 56,
                "path": "src/create.lua"
            }
        },
        {
            "name": "hydrateAutomaticSize",
            "desc": "Applies automatic sizing to any current or future instances in the DataModel that are tagged with\n`\"PlasmaAutomaticSize\"`. Attributes `axis` (string) and `maxSize` (UDim2 or Vector2) are allowed.",
            "params": [],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "RBXScriptConnection"
                }
            ],
            "function_type": "static",
            "tags": [
                "utilities"
            ],
            "realm": [
                "Client"
            ],
            "source": {
                "line": 13,
                "path": "src/hydrateAutomaticSize.lua"
            }
        },
        {
            "name": "new",
            "desc": "",
            "params": [
                {
                    "name": "rootInstance",
                    "desc": "The root instance of which to mount all children. Likely a ScreenGui.",
                    "lua_type": "Instance"
                }
            ],
            "returns": [
                {
                    "desc": "An opaque object which holds persistent state about your UI.",
                    "lua_type": "Node"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 88,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "createContext",
            "desc": "Creates a [Context] object which is used to pass state downwards through the tree without needing to thread it\nthrough every child as props.",
            "params": [
                {
                    "name": "name",
                    "desc": "The human-readable name of the context. This is only for debug purposes.",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "An opqaue Context object which holds persistent state.",
                    "lua_type": "Context"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 102,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "useContext",
            "desc": "Returns the value of this context provided by the most recent ancestor that used `provideContext` with this context.",
            "params": [
                {
                    "name": "context",
                    "desc": "A context object previously created with `createContext`",
                    "lua_type": "Context"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "T"
                }
            ],
            "function_type": "static",
            "tags": [
                "hooks"
            ],
            "source": {
                "line": 119,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "provideContext",
            "desc": "Provides a value for this context for any subsequent uses of `useContext` in this scope.",
            "params": [
                {
                    "name": "context",
                    "desc": "A context object previously created with `createContext`",
                    "lua_type": "Context"
                },
                {
                    "name": "value",
                    "desc": "Any value you want to provide for this context",
                    "lua_type": "T"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 138,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "useEffect",
            "desc": "`useEffect` takes a callback as a parameter which is then only invoked if passed dependencies are different from the\nlast time this function was called. The callback is always invoked the first time this code path is reached.\n\nIf no dependencies are passed, the callback only runs once.\n\nThis function can be used to skip expensive work if none of the dependencies have changed since the last run.\nFor example, you might use this to set a bunch of properties in a widget if any of the inputs change.",
            "params": [
                {
                    "name": "callback",
                    "desc": "A callback function that optionally returns a cleanup function",
                    "lua_type": "() -> () | () -> () -> ()"
                },
                {
                    "name": "...",
                    "desc": "Dependencies",
                    "lua_type": "any"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "hooks"
            ],
            "source": {
                "line": 157,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "useState",
            "desc": "```lua\nlocal checked, setChecked = useState(false)\n\nuseInstance(function()\n\tlocal TextButton = Instance.new(\"TextButton\")\n\n\tTextButton.Activated:Connect(function()\n\t\tsetChecked(not checked)\n\tend)\n\n\treturn TextButton\nend)\n\nTextButton.Text = if checked then \"X\" else \"\"\n```",
            "params": [
                {
                    "name": "initialValue",
                    "desc": "The value this hook returns if the set callback has never been called",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "The previously set value, or the initial value if none has been set",
                    "lua_type": "T"
                },
                {
                    "desc": "A function which when called stores the value in this hook for the next run",
                    "lua_type": "(newValue: T) -> ()"
                }
            ],
            "function_type": "static",
            "tags": [
                "hooks"
            ],
            "source": {
                "line": 217,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "useKey",
            "desc": "Specify a key by which to store all future state in this scope. This is similar to React's `key` prop.\n\nThis is important to use to prevent state from one source being still being applied when it should actually reset.",
            "params": [
                {
                    "name": "key",
                    "desc": "",
                    "lua_type": "string | number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 251,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "useInstance",
            "desc": "`useInstance` takes a callback which should be used to create the initial UI for the widget.\nThe callback is only ever invoked on the first time this widget runs and never again.\nThe callback should return the instance it created.\nThe callback can optionally return a second value, which is the instance where children of this widget should be\nplaced. Otherwise, children are placed in the first instance returned.\n\n`useInstance` returns the `ref` table that is passed to it. You can use this to create references to objects\nyou want to update in the widget body.",
            "params": [
                {
                    "name": "creator",
                    "desc": "A callback which creates the widget and returns it",
                    "lua_type": "(ref: {}) -> (Instance, Instance?)"
                }
            ],
            "returns": [
                {
                    "desc": "Returns the instance returned by `creator`",
                    "lua_type": "Instance"
                }
            ],
            "function_type": "static",
            "tags": [
                "hooks"
            ],
            "source": {
                "line": 272,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "start",
            "desc": "Begins a new frame for this Plasma instance. The `callback` is invoked immediately.\nCode run in the `callback` function that uses plasma APIs will be associated with this Plasma node.\nThe `callback` function is **not allowed to yield**.\n\nIf this function is used, `Plasma.beginFrame`, `Plasma.continueFrame`, and `Plasma.finishFrame` should not be used.",
            "params": [
                {
                    "name": "rootNode",
                    "desc": "A node created by `Plasma.new`.",
                    "lua_type": "Node"
                },
                {
                    "name": "fn",
                    "desc": "",
                    "lua_type": "(...: T) -> ()"
                },
                {
                    "name": "...",
                    "desc": "Additional parameters to `callback`",
                    "lua_type": "T"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 388,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "beginFrame",
            "desc": "Begins a *continuable* Plasma frame. Same semantics as [Plasma.start].\n\nFor a frame:\n- Call `beginFrame` once.\n- Call `continueFrame` any number of times.\n- Call `finishFrame` when the frame is complete.\n\nIf this function is used, `Plasma.start` should not be used.",
            "params": [
                {
                    "name": "rootNode",
                    "desc": "A node created by `Plasma.new`.",
                    "lua_type": "Node"
                },
                {
                    "name": "fn",
                    "desc": "",
                    "lua_type": "(...: T) -> ()"
                },
                {
                    "name": "...",
                    "desc": "Additional parameters to `callback`",
                    "lua_type": "T"
                }
            ],
            "returns": [
                {
                    "desc": "A handle to pass to `continueFrame`",
                    "lua_type": "ContinueHandle"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 410,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "finishFrame",
            "desc": "Finishes a continuable Plasma frame, cleaning up any objects that have been removed since the last frame.",
            "params": [
                {
                    "name": "rootNode",
                    "desc": "A node created by `Plasma.new`.",
                    "lua_type": "Node"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 437,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "continueFrame",
            "desc": "Continue the Plasma frame with a new handler function. Calling this will not trigger any cleanup that typically\nhappens every frame.\n\nThis is intended to be used to continue creating UI within the same frame that you started on. You should call\n[Plasma.beginFrame] once per frame, then `Plasma.continueFrame` any number of times after that, finally calling\n[Plasma.finishFrame].",
            "params": [
                {
                    "name": "continueHandle",
                    "desc": "An object returned by Plasma.start",
                    "lua_type": "ContinueHandle"
                },
                {
                    "name": "fn",
                    "desc": "",
                    "lua_type": "(...: T) -> ()"
                },
                {
                    "name": "...",
                    "desc": "Additional parameters to `callback`",
                    "lua_type": "T"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 459,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "scope",
            "desc": "Begins a new scope. This function may only be called within a `Plasma.start` callback.\nThe `callback` is invoked immediately.\n\nBeginning a new scope associates all further calls to Plasma APIs with a nested scope inside this one.",
            "params": [
                {
                    "name": "fn",
                    "desc": "",
                    "lua_type": "(...: T) -> ()"
                },
                {
                    "name": "...",
                    "desc": "Additional parameters to `callback`",
                    "lua_type": "T"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 481,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "widget",
            "desc": "This function takes a widget function and returns a function that automatically starts a new scope when the function\nis called.",
            "params": [
                {
                    "name": "fn",
                    "desc": "The widget function",
                    "lua_type": "(...: T) -> ()"
                }
            ],
            "returns": [
                {
                    "desc": "A function which can be called to create the widget",
                    "lua_type": "(...: T) -> ()"
                }
            ],
            "function_type": "static",
            "source": {
                "line": 493,
                "path": "src/Runtime.lua"
            }
        },
        {
            "name": "useStyle",
            "desc": "Returns the current style information, with styles that are set more recently in the tree overriding styles that\nwere set further up. In this way, styles cascade downwards, similar to CSS.",
            "params": [],
            "returns": [],
            "function_type": "static",
            "tags": [
                "style"
            ],
            "source": {
                "line": 23,
                "path": "src/Style.lua"
            }
        },
        {
            "name": "setStyle",
            "desc": "Defines style for any subsequent calls in this scope. Merges with any existing styles.",
            "params": [
                {
                    "name": "styleFragment",
                    "desc": "A dictionary of style information",
                    "lua_type": "{[string]: any}"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "style"
            ],
            "source": {
                "line": 35,
                "path": "src/Style.lua"
            }
        },
        {
            "name": "arrow",
            "desc": "- `arrow(from: Vector3, to: Vector3)` -> Creates an arrow between `from` and `to`\n- `arrow(point: Vector3)` -> Creates an arrow pointing at `point`\n- `arrow(cframe: CFrame)` -> Creates an arrow with its point at the CFrame position facing the CFrame LookVector\n- `arrow(part: BasePart)` -> Arrow represents the Part's CFrame\n- `arrow(fromPart: BasePart, toPart: BasePart)` -> Arrow between the two parts\n\n![Arrows](https://i.eryn.io/2150/arrows.png)\n\n```lua\nPlasma.arrow(Vector3.new(0, 0, 0))\nPlasma.arrow(Vector3.new(5, 5, 5), Vector3.new(10, 10, 10))\n```",
            "params": [
                {
                    "name": "from",
                    "desc": "",
                    "lua_type": "Vector3 | CFrame | BasePart"
                },
                {
                    "name": "to",
                    "desc": "",
                    "lua_type": "Vector3 | BasePart | nil"
                },
                {
                    "name": "color",
                    "desc": "Optional color. Random if not specified.",
                    "lua_type": "Color3?"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 22,
                "path": "src/widgets/arrow.lua"
            }
        },
        {
            "name": "blur",
            "desc": "A blur effect in the world. Created in Lighting.",
            "params": [
                {
                    "name": "size",
                    "desc": "The size of the blur",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 9,
                "path": "src/widgets/blur.lua"
            }
        },
        {
            "name": "button",
            "desc": "A text button.\n\nReturns a widget handle, which has the field:\n\n- `clicked`, a function you can call to check if the checkbox was clicked this frame\n\n![A button](https://i.eryn.io/2150/RobloxStudioBeta-iwRM0RMx.png)\n\n```lua\nPlasma.window(\"Button\", function()\n\tif Plasma.button(\"button text\"):clicked() then\n\t\tprint(\"clicked!\")\n\tend\nend)\n```",
            "params": [
                {
                    "name": "label",
                    "desc": "The label for the checkbox",
                    "lua_type": "string"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "ButtonWidgetHandle"
                }
            ],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 24,
                "path": "src/widgets/button.lua"
            }
        },
        {
            "name": "checkbox",
            "desc": "A checkbox. A checkbox may either be controlled or uncontrolled.\n\nBy passing the `checked` field in `options`, you make the checkbox controlled. Controlling the checkbox means that\nthe checked state is controlled by your code. Otherwise, the controlled state is controlled by the widget itself.\n\nReturns a widget handle, which has the fields:\n\n- `checked`, a function you can call to check if the checkbox is checked\n- `clicked`, a function you can call to check if the checkbox was clicked this frame\n\n![Checkboxes](https://i.eryn.io/2150/9Yg31gc8.png)\n\n```lua\nPlasma.window(\"Checkboxes\", function()\n\tif Plasma.checkbox(\"Controlled checkbox\", {\n\t\tchecked = checked,\n\t}):clicked() then\n\t\tchecked = not checked\n\tend\n\n\tPlasma.checkbox(\"Disabled checkbox\", {\n\t\tchecked = checked,\n\t\tdisabled = true,\n\t})\n\n\tPlasma.checkbox(\"Uncontrolled checkbox\")\nend)\n```",
            "params": [
                {
                    "name": "label",
                    "desc": "The label for the checkbox",
                    "lua_type": "string"
                },
                {
                    "name": "options",
                    "desc": "",
                    "lua_type": "{disabled: boolean, checked: boolean}"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "CheckboxWidgetHandle"
                }
            ],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 38,
                "path": "src/widgets/checkbox.lua"
            }
        },
        {
            "name": "heading",
            "desc": "Text, but bigger!",
            "params": [
                {
                    "name": "text",
                    "desc": "",
                    "lua_type": "string"
                },
                {
                    "name": "options?",
                    "desc": "",
                    "lua_type": "{font: Font}"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 14,
                "path": "src/widgets/heading.lua"
            }
        },
        {
            "name": "highlight",
            "desc": "Creates a highlight over an instance with the specified options, using the Roblox [Highlight] instance",
            "params": [
                {
                    "name": "adornee",
                    "desc": "",
                    "lua_type": "Instance"
                },
                {
                    "name": "options?",
                    "desc": "",
                    "lua_type": "HighlightOptions"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 24,
                "path": "src/widgets/highlight.lua"
            }
        },
        {
            "name": "label",
            "desc": "Text.",
            "params": [
                {
                    "name": "text",
                    "desc": "",
                    "lua_type": "string"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 14,
                "path": "src/widgets/label.lua"
            }
        },
        {
            "name": "portal",
            "desc": "The portal widget creates its children inside the specified `targetInstance`. For example, you could use this\nto create lighting effects in Lighting as a widget:\n\n\n```lua\nreturn function(size)\n\tportal(Lighting, function()\n\t\tuseInstance(function()\n\t\t\tlocal blur = Instance.new(\"BlurEffect\")\n\t\t\tblur.Size = size\n\t\t\treturn blur\n\t\tend)\n\tend)\nend\n```",
            "params": [
                {
                    "name": "targetInstance",
                    "desc": "Where the portal goes to",
                    "lua_type": "Instance"
                },
                {
                    "name": "children",
                    "desc": "Children",
                    "lua_type": "() -> ()"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 24,
                "path": "src/widgets/portal.lua"
            }
        },
        {
            "name": "row",
            "desc": "Lays out children horizontally",
            "params": [
                {
                    "name": "options",
                    "desc": "",
                    "lua_type": "{padding: Vector2}"
                },
                {
                    "name": "children",
                    "desc": "Children",
                    "lua_type": "() -> ()"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 10,
                "path": "src/widgets/row.lua"
            }
        },
        {
            "name": "space",
            "desc": "Blank space of a certain size.",
            "params": [
                {
                    "name": "size",
                    "desc": "",
                    "lua_type": "number"
                }
            ],
            "returns": [],
            "function_type": "static",
            "source": {
                "line": 12,
                "path": "src/widgets/space.lua"
            }
        },
        {
            "name": "spinner",
            "desc": "A spinner widget, indicating loading.\n\n![A spinner](https://i.eryn.io/2150/RobloxStudioBeta-sEyci8qy.png)",
            "params": [],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 10,
                "path": "src/widgets/spinner.lua"
            }
        },
        {
            "name": "table",
            "desc": "A table widget. Items is a list of rows, with each row being a list of cells.\n\n```lua\nlocal items = {\n\t{\"cell one\", \"cell two\"},\n\t{\"cell three\", \"cell four\"}\n}\n```\n\n![Table](https://i.eryn.io/2227/NEc4Dmnv.png)",
            "params": [
                {
                    "name": "items",
                    "desc": "",
                    "lua_type": "{{string}}"
                },
                {
                    "name": "options",
                    "desc": "",
                    "lua_type": "{marginTop?: number, selectable?: boolean, font?: Font, headings?: boolean}"
                }
            ],
            "returns": [],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 118,
                "path": "src/widgets/table.lua"
            }
        },
        {
            "name": "window",
            "desc": "A window widget. Contains children.\n\n- Closable\n- Draggable\n- Resizable\n\nReturns a widget handle, which has the field:\n\n- `closed`, a function you can call to check if the close button was clicked.\n\n![Window with checkboxes](https://i.eryn.io/2150/TVkkOnxj.png)",
            "params": [
                {
                    "name": "options",
                    "desc": "The title of the window, or options",
                    "lua_type": "string | WindowOptions"
                },
                {
                    "name": "children",
                    "desc": "Children",
                    "lua_type": "() -> ()"
                }
            ],
            "returns": [
                {
                    "desc": "",
                    "lua_type": "WindowWidgetHandle"
                }
            ],
            "function_type": "static",
            "tags": [
                "widgets"
            ],
            "source": {
                "line": 34,
                "path": "src/widgets/window.lua"
            }
        }
    ],
    "properties": [],
    "types": [
        {
            "name": "HighlightOptions",
            "desc": "",
            "fields": [
                {
                    "name": "outlineColor?:",
                    "lua_type": "Color3",
                    "desc": ""
                },
                {
                    "name": "fillColor?:",
                    "lua_type": "Color3",
                    "desc": ""
                },
                {
                    "name": "fillTransparency?:",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "outlineTransparency?:",
                    "lua_type": "number",
                    "desc": ""
                },
                {
                    "name": "fillMode?:",
                    "lua_type": "HighlightFillMode",
                    "desc": ""
                }
            ],
            "source": {
                "line": 14,
                "path": "src/widgets/highlight.lua"
            }
        },
        {
            "name": "WindowOptions",
            "desc": "",
            "fields": [
                {
                    "name": "title?",
                    "lua_type": "string",
                    "desc": ""
                },
                {
                    "name": "closable?",
                    "lua_type": "boolean",
                    "desc": ""
                },
                {
                    "name": "movable?",
                    "lua_type": "boolean",
                    "desc": ""
                },
                {
                    "name": "resizable?",
                    "lua_type": "boolean",
                    "desc": ""
                }
            ],
            "source": {
                "line": 13,
                "path": "src/widgets/window.lua"
            }
        }
    ],
    "name": "Plasma",
    "desc": "",
    "source": {
        "line": 2,
        "path": "src/init.lua"
    }
}