Skip to content

Expandable Tabs

Pro

Icon tabs whose active tab grows to show its name on one moving pill. Add the optional popup parts and the bar morphs into a panel.

  • Base UI
  • Motion
  • React 19
  • Tailwind CSS 4

Added Nov 9, 2026 · Pro license

Playground

Loading the preview

Props

Needs your Pro API key in GELATIN_UI_PRO_TOKEN. Set it up

Pro itemAPI key required

Expandable Tabs needs a Pro API key

Try the live preview for free. With Pro, the add command above puts the source in your project.

Files it adds
33
More Pro items, one API key
+327
Your coding agent runs it
1 cmd

$79$129once, for life

Already have Pro? Sign in to set up your API key.

Each trigger shows an icon, and the selected one opens its label. Add the popup parts when a tab opens a panel.

app-tabs.tsx

ExpandableTabs

<div>
PropTypeDefaultDescription
classNamestring—
onValueChange—Called with the next value: a tab press (the Base UI details), a close of the Expandable Tabs Popup (escape-key, outside-press, trigger-press, value null), or the fallback of an uncontrolled root (missing, disabled). Call details.cancel on Base UI details to keep the value.
From Base UITabs.RootBase UI docs
valueany—The value of the currently active Tab. Use when the component is controlled. When the value is null, no Tab will be active.
defaultValueany0The default value. Use when the component is not controlled. When the value is null, no Tab will be active.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ExpandableTabsList

<div>
PropTypeDefaultDescription
fullWidthbooleanfalse
rounded"default""full""full"
size"default""lg""sm""default"
variant"default""ghost"—
classNamestring—
expandOnHoverbooleanfalseGrow a tab while the mouse is over it too, not only the active one (default false). The other tabs slide while you aim, so the default shows the name in a Tooltip instead.
From Base UITabs.ListBase UI docs
activateOnFocusbooleanfalseWhether to automatically change the active tab on arrow key focus. Otherwise, tabs will be activated using <kbd>Enter</kbd> or <kbd>Space</kbd> key press.
loopFocusbooleantrueWhether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ExpandableTabsTrigger

<button>
PropTypeDefaultDescription
classNamestring—
valueRequiredany—The value of the tab (required: the root matches it, and the popup panel with it).
childrenRequiredReactNode—An ExpandableTabsIcon (16px; it stays in one place while the tab grows) and an ExpandableTabsLabel with the name of the tab: shown next to the icon when active, in the Tooltip when not, and always its accessible name.
From Base UITabs.TabBase UI docs
disabledbooleanfalseWhether the Tab is disabled. If a first Tab on a <Tabs.List> is disabled, it won't initially be selected. Instead, the next enabled Tab will be selected. However, it does not work like this during server-side rendering, as it is not known during pre-rendering which Tabs are disabled. To work around it, ensure that defaultValue or value on <Tabs.Root> is set to an enabled Tab's value.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<button> attributes—Every other attribute goes to the <button>, with a ref.

ExpandableTabsIcon

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ExpandableTabsLabel

<span>
PropTypeDefaultDescription
...props<span> attributes—Every other attribute goes to the <span>, with a ref.

ExpandableTabsContent

<div>
PropTypeDefaultDescription
classNamestring—
gap"default""none"—The space between the list and the panel: default (12px) or none, for a panel that sits flush under a list in a head with its own edge (the JSX Preview stage).
From Base UITabs.PanelBase UI docs
valueRequiredany—The value of the TabPanel. It will be shown when the Tab with the corresponding value is active.
keepMountedbooleanfalseWhether to keep the HTML element in the DOM while the panel is hidden.
render—Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ExpandableTabsPopup

<div>
PropTypeDefaultDescription
side"bottom""top""top"The side of the bar where the panel grows: top (default, a bar at the bottom of a screen) or bottom (a bar at the top).
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ExpandableTabsPopupPanels

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

ExpandableTabsPopupPanel

<div>
PropTypeDefaultDescription
classNamestring—
From Base UITabs.PanelBase UI docs
valueRequiredany—The value of the TabPanel. It will be shown when the Tab with the corresponding value is active.
style—Style applied to the element, or a function that returns a style object based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it when the bar has 3 to 6 views with clear icons, and room is short.
  • Add ExpandableTabsPopup when each tab opens a small panel of choices over the page.
  • Use fullWidth for a phone tab bar that fills the row.
  • For text tabs that all show their names, use Tabs.
  • For a single choice of a value, not a view, use a Segmented Control.
  • For a vertical column of icons, use a Sidebar.
Arrow LeftorArrow RightMoves focus to the next tab. Without the popup, it also shows that view.
HomeorEndMoves focus to the first or the last tab.
EnterorSpaceOpens the focused tab. A second press on the active tab closes the popup.
EscapeCloses the popup and puts focus on the active tab.
Tab grow
island · the label clip opens to the label width, and the tabs after it slide in the same frames
Pill
island · one pill follows the active tab on the same spring
Popup surface
island · the surface grows from the bar edge to the panel size
Panel switch
island · the new panel moves in 12px from the side of the new tab, from 96% scale and a 2px blur
Icon press
press · the icon scales to 0.92

Built with

Installs with Expandable Tabs

Components
Tabs,Tooltip
  1. AddedExpandable Tabs, with Tabs, Tooltip.
Open the release