structyl

Tabs

stable

A set of layered sections of content — known as tab panels — displayed one at a time.

Basic usage

Make changes to your account here.

Examples

Three tabs

Multiple tabs for account, password, and billing settings.

Make changes to your account here.

Account settings layout

Tabs can organize forms and large detail panels without leaving the page.

Semantic colors

Pass color to Tabs.Root to use a semantic accent for the active indicator.

Features

  • Can be controlled or uncontrolled.
  • Supports horizontal/vertical orientation.
  • Supports automatic and manual activation.
  • Full keyboard navigation.

Installation

bash
pnpm dlx structyl add tabs

API Reference

Tabs API reference

Full props, types, defaults, and all 4 parts.

View API

Keyboard interactions

Adheres to the WAI-ARIA design pattern .

KeyDescription
TabMoves focus to the active trigger, then the panel.
ArrowLeft / ArrowRightMoves to the previous / next tab.
Home / EndMoves to the first / last tab.
Tabs | structyl