Forest Logo
search
package_2

vide-foundation

By @kaan650

Roblox

Mirrored from Wally

VideFoundation

Roblox's Foundation design system for Vide, ported from React Foundation 1.123.

Install

[dependencies]
VideFoundation = "kaan650/vide-foundation@0.2.1"

Usage

local Vide = require(ReplicatedStorage.Packages.Vide)
local Foundation = require(ReplicatedStorage.Packages.VideFoundation)

local count = Vide.source(0)

Vide.mount(function()
	return Foundation.FoundationProvider({
		colorMode = "Dark",
		children = function()
			return Foundation.View({
				tag = "size-full bg-surface-100 padding-xlarge col gap-large",
				children = {
					Foundation.Text({
						Text = function()
							return `Clicked {count()} times`
						end,
						tag = "auto-xy text-heading-large content-emphasis",
						LayoutOrder = 1,
					}),
					Foundation.Button({
						text = "Click",
						variant = "Emphasis",
						onActivated = function()
							count(count() + 1)
						end,
						LayoutOrder = 2,
					}),
				},
			})
		end,
	})
end, playerGui.ScreenGui)
  • Props take a value or a source: isDisabled = disabled, text = function() return ... end.
  • Style with Foundation's tags, tag = "bg-surface-100 radius-medium". On your own instances, use Foundation.tags("bg-surface-100").
  • Components that provide a context (FoundationProvider, Popover.Root, List.Root...) take children as a function.
  • Refs are callback props: ref, textBoxRef, inputRef.

To see every component, run wally install and rojo serve dev.project.json, then open the VideFoundation storybook in UI Labs.

Foundation, its design tokens, Builder Icons and images are made by Roblox.

Package Details

Install command (Click to copy)


Version

0.2.1

License

MIT

check_circle

Safe for commercial use

Automated license review — not legal advice.