Tabs
Tab interface with three visual variants, three sizes, and keyboard navigation.
Basic
Variants
Three visual treatments. default is an underlined header strip; segmented is a connected pill of buttons; ghost is minimal in-card chrome.
Sizes
Heights match Fluxon.Components.Button sizes so a tab strip can sit flush next to buttons of the same size.
With icons
Add class="icon" to icon elements so the size variants resize them to match the tab text.
With badges and counts
Tab content is arbitrary HEEx, so labels can compose icons, counts, or any inline element.
Disabled tabs
Use disabled or aria-disabled="true" to skip a tab in click and arrow-key navigation.
Auto-sized segmented
Segmented and ghost tabs stretch to fill the row by default. Pass class="flex-none" on a tab to size it to its content instead.
Custom panel layout
tabs_panel ships with no padding so panels sit flush to the tablist. Use class for whatever layout the panel needs.
Server-driven active tab
Drive both active_tab on the list and active on each panel from the same assign so server and client state stay aligned across patches.
Active tab: profile • server events received: 0
Dynamic tabs
Pair :for on the tab slot with :for on the panels using the same source list. The controller re-wires aria attributes for added or reordered tabs on the next patch.
Nested tabs
Each tabs instance scopes its tablist and panel queries to its own container. Inner clicks never leak to the outer instance. Each container needs a unique id.
In a card header
size="xs" variant="segmented" sits flush in a card toolbar as a compact view switcher.