EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
TabList·component·@astryxdesign/core

Tab Menu

Overflow menu trigger that opens a dropdown of additional tab options, showing the selected option's label as the trigger text.

Open in Playground @astryxdesign/core/TabList

Showcases and examples

2 documented examples

Tab Menu

TabMenu is an overflow menu within a TabList that groups additional tab options into a dropdown, showing the selected option's label as the trigger text.

Preview loads on approachPreview loads on approach
Exact source · tab-menu-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {useState} from 'react';
import {TabList, Tab, TabMenu} from '@astryxdesign/core/TabList';

export default function TabMenuShowcase() {
  const [value, setValue] = useState('settings');
  return (
    <TabList value={value} onChange={setValue}>
      <Tab value="overview" label="Overview" />
      <Tab value="activity" label="Activity" />
      <TabMenu
        label="More"
        options={[
          {value: 'settings', label: 'Settings'},
          {value: 'integrations', label: 'Integrations'},
          {value: 'billing', label: 'Billing'},
        ]}
      />
    </TabList>
  );
}

Usage

Overflow menu trigger that opens a dropdown of additional tab options, showing the selected option's label as the trigger text.

Typed props

PropType and behavior
labelstring · required
Label for the trigger button (shown when no option is selected) and the dropdown heading divider.
optionsTabMenuOption[] · required
Array of menu options rendered in the dropdown.