ReviewOS

stacks/stx

Built-in Tabs component (<StxTabs>)

#1678
Closed glennmichael123 opened this 23 days ago · 1 comment
23 days ago

Summary

Tabbed content panels with keyboard navigation and signal-driven active state.

Usage

<StxTabs default="general">
  <StxTab id="general" label="General">
    <p>General settings content</p>
  </StxTab>
  <StxTab id="security" label="Security" icon="shield">
    <p>Security settings content</p>
  </StxTab>
  <StxTab id="billing" label="Billing" disabled>
    <p>Billing content</p>
  </StxTab>
</StxTabs>

Props

  • <StxTabs>: default (initial tab), variant (underline/pills/bordered), orientation (horizontal/vertical)
  • <StxTab>: id, label, icon, disabled, badge

Features

  • Keyboard: Arrow keys to switch, Tab to enter content
  • ARIA: tablist/tab/tabpanel roles
  • Lazy rendering option (only render active tab)
  • URL hash sync optional
  • Animated indicator bar
23 days ago

Delivered via @stacksjs/components, which ships with every stx app and is auto-registered (no import needed in .stx files). See CLAUDE.md § "Reach for stx primitives before vanilla JS" for the full inventory; the relevant components for this request are documented there.

Closing as effectively delivered. If a specific behavior or API affordance from the original request is missing from the shipped components, please open a focused ticket against @stacksjs/components describing the exact gap — that's easier to track than a broad "make it a builtin" ask.

Sign in to comment on this issue.