#Vision

A declarative instance library for Luau. Describe a tree as a table, stage data into it, and create it when you are ready.

Existence Begins With Perception.

Get started · API · Comparison

#At a glance

local Vision = require(ReplicatedStorage.Shared.Vision)

local event, ready, mount = Vision.event, Vision.ready, Vision.mount

local Scope = Vision.Scope()

local Interface = Scope:Capture({
    ClassName = "ScreenGui",
    Name = "Counter",

    mount(PlayerGui),

    {
        ClassName = "TextLabel",
        Name = "Readout",
        Size = UDim2.fromOffset(200, 40),

        event("Count", 0, function(self, _, Value)
            self.Text = `Clicks: {Value}`
        end),

        ready(function(self)
            print("live:", self.Name)
        end),
    },
})

Interface.Count(7)
Interface.Count(12)

Interface:Mount()

Nothing is created until Mount. The two writes above coalesce, so the label's callback runs exactly once, with 12.

#Installing

Vision is a folder of Luau modules with no dependencies. Drop src/shared/Vision anywhere your code can require it.

local Vision = require(ReplicatedStorage.Shared.Vision)

#AI disclosure

The site had AI assistance on it from Claude. All code by me(Raikin7).

#Credits

The structure and source concept of this documentation is adapted from Vide by centau, a reactive UI library for Luau. Vide is also the library Vision is measured against in the comparison - it is worth your time regardless of which you end up using.