Skip to content

Responsive

Types

ScaleMode type

luau
type ScaleMode = "min" | "width" | "height" | "max"

Breakpoint type

luau
type Breakpoint = "phone" | "tablet" | "desktop"

Platform type

luau
type Platform = "console" | "mobile" | "pc" | "vr"

SafeAreaInsets type

luau
type SafeAreaInsets = { top: number, bottom: number, left: number, right: number }

Breakpoints type

luau
type Breakpoints = { phone: number, tablet: number }

Config type

luau
type Config = {
	reference: Vector2,
	mode: ScaleMode,
	min: number?,
	max: number?,
	breakpoints: Breakpoints,
}

PartialConfig type

luau
type PartialConfig = {
	reference: Vector2?,
	mode: ScaleMode?,
	min: number?,
	max: number?,
	breakpoints: Breakpoints?,
	viewport: Graph.Reactive<Vector2>?,
}

Properties

config Read Only

luau
Responsive.config: Config

Live defaults shared by every derived node; mutate once at startup.

Open Documentation

platform Read Only

luau
Responsive.platform: Platform

The device class detected at startup: "vr", "console" (ten-foot interface), "pc" (keyboard and mouse), or "mobile"; "pc" where detection is unavailable.

Open Documentation

viewport Read Only

luau
Responsive.viewport: Graph.Node<Vector2>

The active camera's ViewportSize as a node, live on the client.

Open Documentation

scale Read Only

luau
Responsive.scale: Graph.Node<number>

UIScale factor derived from viewport; 1.0 at config.reference.

Open Documentation

breakpoint Read Only

luau
Responsive.breakpoint: Graph.Node<Breakpoint>

Size class derived from viewport width.

Open Documentation

safeArea Read Only

luau
Responsive.safeArea: Graph.Node<SafeAreaInsets>

Topbar / Core-UI inset pixels from GuiService:GetGuiInset().

Open Documentation

Functions

scaleOf

luau
Responsive.scaleOf(partial: PartialConfig?): Graph.Node<number>

Factory escape hatch: a scale node with per-surface config (merged over defaults).

Open Documentation

breakpointOf

luau
Responsive.breakpointOf(partial: PartialConfig?): Graph.Node<Breakpoint>

Factory escape hatch: a breakpoint node with per-surface thresholds.

Open Documentation