Tabs

Behavior-only Tabs primitives for Roblox UI, aligned with the lattice compound pattern.

Stable direction
@lattice-ui/tabs

Part of the stable direction toward v1.0.

What It Is For

Use Tabs when the screen should switch between sibling panels without leaving the current route or layout.

It is a good fit for profile pages, settings surfaces, and inspector UIs where the current section should stay explicit.

Preview size

Live demo is experimental and may contain bugs.

Install

Global CLI command: lattice add tabs

Monorepo local script

Use your package manager wrapper when running the local lattice command.

pnpm lattice add tabs

npm package: @lattice-ui/tabs

Peer dependencies

  • @rbxts/react
  • @rbxts/react-roblox

Public Exports

  • Tabs
  • Tabs.Root
  • Tabs.List
  • Tabs.Trigger
  • Tabs.Content

State Model

  • Tabs.Root manages a single selected value with controlled or uncontrolled ownership.
  • Triggers register with orientation-aware ordering so selection movement can advance through enabled items.
  • Tabs.Content can stay mounted with forceMount even when its tab is not the active value.

Key API

Tabs.Root

Use value, defaultValue, onValueChange, and orientation to define the navigation model.

Tabs.Trigger

Each trigger needs a stable value; disabled removes it from activation and directional movement.

Tabs.Content

Use forceMount when inactive content still needs measurement, retained state, or custom animation handling.

Composition Patterns

Screen subsections

Use tabs when the user needs to move between a few related panels while keeping the container layout constant.

Inspector sidebars

Use orientation="vertical" when the trigger list should behave more like a navigation rail than a top bar.

Cautions / Limits

  • Current behavior activates tabs immediately when selection moves; there is no separate manual activation mode.
  • Tabs solve disclosure and selection, not overlaying or lazy positioning; reach for Accordion or Dialog when the UI contract is different.