Skip to content

Responsive ​

The screen and the player as shared nodes: viewport, UI scale, breakpoint, input device and accessibility settings. Available as Flux.Responsive. For safe areas (the topbar, notches, rounded corners), set the engine's ScreenGui.ScreenInsets (CoreUISafeInsets or DeviceSafeInsets) and ScreenGui.SafeAreaCompatibility instead.

luau
Flux.new "UIScale" { Scale = Flux.Responsive.scale }

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"

DisplaySize type ​

luau
type DisplaySize = "Small" | "Medium" | "Large"

Input type ​

luau
type Input = "keyboard" | "touch" | "gamepad"

TextSize type ​

luau
type TextSize = "Medium" | "Large" | "Larger" | "Largest"

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

Default responsive configuration shared by derived nodes. Mutate once at startup before building UI.

Open Documentation

platform Read Only ​

luau
Responsive.platform: Graph.Node<Platform>

Active device class ("vr", "console", "pc", or "mobile"), updated live on the client ("pc" off-client).

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>

UI scale factor derived from viewport (1.0 at config.reference).

Open Documentation

breakpoint Read Only ​

luau
Responsive.breakpoint: Graph.Node<Breakpoint>

Size class ("phone" | "tablet" | "desktop") derived from viewport width.

Open Documentation

displaySize Read Only ​

luau
Responsive.displaySize: Graph.Node<DisplaySize>

Physical screen size class ("Small", "Medium", or "Large") mirroring GuiService.ViewportDisplaySize.

Open Documentation

input Read Only ​

luau
Responsive.input: Graph.Node<Input>

Active input mode ("keyboard", "touch", or "gamepad") tracking UserInputService.PreferredInput on the client.

Open Documentation

textSize Read Only ​

luau
Responsive.textSize: Graph.Node<TextSize>

Player's preferred text size ("Medium", "Large", "Larger", or "Largest") from GuiService.PreferredTextSize. Roblox scales rendered text automatically, so use this to adjust surrounding container spacing rather than multiplying TextSize.

Open Documentation

reducedMotion Read Only ​

luau
Responsive.reducedMotion: Graph.Node<boolean>

Tracks GuiService.ReducedMotionEnabled (true when the player prefers reduced motion).

Open Documentation

preferredTransparency Read Only ​

luau
Responsive.preferredTransparency: Graph.Node<number>

Tracks GuiService.PreferredTransparency from 0 (opaque backgrounds) to 1 (default).

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