SwipeUI

TabBarActionMorph

A floating bar whose centre action is stretched into a peak that spits a drop out, which blooms into a small Liquid Glass menu; closing lets it fall back in.

npx @swipeui/cli add tab-bar-action-morph
Variant
Preset
Material
Scheme
Feel
Interactive web demo. Native materials, gestures and system presentation differ on device.

When to use it

  • A centre button that opens a small set of quick actions, such as New note, Photo and Voice memo.
  • Creation flows with more than one starting point, where a single Create button would need a follow-up screen.
  • Actions that run async work (uploading, saving) and need clear failure handling.
  • Apps that want the action menu to feel attached to the tab bar.

When not to use it

  • A single primary action. Centre action tab bar is simpler.
  • Long lists of actions. Use Action sheet or a full menu screen.
  • Navigation between sections; quick actions should do something, not go somewhere.
  • Destructive actions that need confirmation. Use Action sheet with a destructive item or Dialog.

Installation

Installs with a Pro licence

Everything on this page is public except the source. Founder pre-sale opens around 5 January 2027.

Usage

app/(tabs)/_layout.tsx
import { TabBarActionMorph } from '@/components/swipeui/tab-bar/tab-bar-action-morph';

<Tabs
  tabBar={(props) => (
    <TabBarActionMorph
      {...props}
      actionIcon={<PlusIcon />}
      actionLabel="Create"
      actions={actions}
    />
  )}
/>;

API reference

PropTypeDefaultDescription
motion?MotionOverridethe app feel

Local motion feel or spring override.

material?"auto" | GlassMaterial'auto'

Preferred material; unsupported choices fall back.

glassStyle?"clear" | "regular"'regular'

Native glass style.

blurTarget?React.RefObject<ReactNativeElement | null>—

Android requires a BlurTargetView ref for real blur.

blurIntensity?number60

Blur strength.

variant?"compact" | "labelled"'compact'

compact shows the centre action as a round icon; labelled as a capsule with its label.

actionIcon?ActionMorphIcona plus

The icon inside the centre action. It turns 45° as the menu opens, so the built-in plus becomes a cross.

actionOpenIcon?ActionMorphIcon—

An icon that replaces actionIcon while the menu is open.

actionLabelstring—

The name of the centre action, also the menu's name.

actionsreadonly TabBarQuickAction[]—

The quick actions the centre action opens.

open?boolean—

Whether the menu is open, for controlled use.

defaultOpen?booleanfalse

Whether the menu starts open when uncontrolled.

onOpenChange?((open: boolean) => void)—

Called when the menu asks to open or close.

onActionError?((error: unknown) => void)—

Called with the error when an action rejects. The menu stays open and the action offers a retry.

menuWidth?number180

The menu's width; it is kept inside the screen.

menuTint?booleantrue

Washes the menu's glass with the glass-tint token, so its rows read clearly over busy content.

presentation?"menu" | "sheet"'menu'

menu blooms the glass menu out of the centre action; sheet shows the same actions in a bottom sheet.

haptics?booleantrue

Plays a selection tick when the tab changes and a light tap on the actions.

hideOnKeyboard?booleantrue

Hides the bar while the keyboard is open. A screen's tabBarHideOnKeyboard wins.

messages?TabBarActionMorphMessages—

Replaces the built-in wording: the spoken badge count, the retry label, the failure announcement and the close name.

className?string—

Classes merged over the bar.

style?StyleProp<ViewStyle>—

Style escape hatch for the bar.

testID?string—

The tab list gets testID, the action ${testID}-action, its menu ${testID}-action-menu, each quick action ${testID}-action-${key}, and each tab ${testID}-${routeName} unless its screen sets tabBarButtonTestID.

Composition and behavior

  • Tabs are split around a centre action named by actionLabel. Its plus (or your actionIcon) turns into a cross while the menu is open.
  • presentation sheet shows the same quick actions in a bottom sheet instead of the glass menu; each variant has a -sheet twin.
  • The menu is Liquid Glass and the action acts like a black hole: its top is stretched into a peak, a drop pinches off and blooms into the menu centred over the button, kept inside the screen, over a light scrim. The cross or a tap outside shrinks the menu into a circle that falls back into the button under gravity, and the button squashes as it lands. menuWidth sets its width, menuTint washes the glass so the rows read clearly (on by default), and material and glassStyle choose the glass.
  • ActionMorphButton is the same button and menu on its own, for any bar or toolbar, and ActionMorphMenu opens the menu from a button you don't draw. Both come from action-morph-menu, which this bar installs; import them from components/swipeui/tab-bar/action-morph-menu. The app needs OverlayProvider at its root.
  • actions lists the quick actions; each has a key, label, icon, onPress and optional disabled.
  • variant shows a round icon (compact) or a capsule with the icon and label (labelled).
  • Control visibility with open and onOpenChange, or use defaultOpen.
  • An action that returns a promise shows progress in its row. If it fails, that row becomes a retry and the menu stays open; onActionError receives the error.
  • messages replaces the retry label, the failure announcement and the spoken badge wording.
  • actionMorphTabBarHeight(insets.bottom) gives the space to pad scroll content by.
  • See Liquid Glass and fallbacks and navigation patterns.

Behavior and gestures

  • Tap the centre button: its plus turns into a cross, its top is stretched up into a smooth peak, a drop pinches off and is thrown up, and it blooms into a small Liquid Glass menu centred over the button, kept inside the screen, over a light scrim.
  • Tap the cross or anywhere outside: the menu shrinks back into a circle, which falls into the button under gravity, stretching into a raindrop, and the button squashes as it lands.
  • Tapping an action runs it. While it's working, every action is disabled so it can't be triggered twice.
  • When the action finishes, the menu closes on its own.
  • If the action fails, its row turns into a retry and the menu stays open.
  • Tabs on either side work as normal with a selection tick.

Accessibility

  • When the menu opens, focus moves to its title; when it closes, focus returns to the centre button.
  • The menu is announced as a menu and each action as a menu item.
  • Failures are announced right away to screen readers and shown as an alert.
  • Disabled actions are reported as unavailable.
  • Give the trigger a clear actionLabel, such as "Create"; it's read even when only the icon shows.

Motion

  • Uses the press, morph and overlay motion roles, so it follows your app's feel. Pass motion to tune this one instance.
  • Opening: the peak rises with the press timing while the button stretches up, the drop is thrown up with the morph timing (slowing, its tail shortening) as the peak springs back, and it blooms into the menu on the overlay spring; the rows arrive last.
  • Closing: the menu shrinks on the morph spring, the drop falls for the same length with the exit's accelerating ease (its tail growing), and the button squashes and springs back as it lands.
  • The peak and the drop are drawn paths in the button's colour; the drop melts away to show the glass it has become. Glass is never faded, only scaled.
  • Under Reduce Motion the menu appears in place.

Performance

  • The menu is mounted only while open.
  • Stale results from an action that finished after the menu closed are ignored.

Notes for AI

  • Make each action's onPress return a promise and pass onActionError to report failures.
  • Wrap the app in OverlayProvider; the menu draws in the shared overlay.
  • For the same menu on any button, or from a native tab, use action-morph-menu (ActionMorphButton, ActionMorphMenu) or native-tabs-action.

Compatibility

Runs onSupported
Expo SDK 57Yes
Expo SDK 58Yes
React Native CLI (with Expo modules)Yes
Expo GoYes
Expo RouterYes
React Navigation 7Yes
iOSYes
AndroidYes

This table describes API support and static bundle checks. Native runtime, device accessibility and bare Uniwind compatibility remain pending.

Related items