Skip to content

Morph Menu

Pro

A menu pill that springs into a panel of links. The box grows on its own springs, the lines turn into a cross, and each link bounces in.

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

Added Nov 21, 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

Morph Menu 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
10
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.

Compose the trigger and the links as parts; each link is a real a.

site-menu.tsx

MorphMenu

<div>
PropTypeDefaultDescription
openboolean—Whether the menu is open (controlled).
defaultOpenboolean—Whether the menu is open at first (uncontrolled). Default false.
onOpenChange—Called when the menu opens or closes.
size"default""sm""default"The pill size: sm is 44px tall, default 52px.
side"center""end""start""center"Where the box grows from. center (default) grows out from the middle of the pill to both sides; start grows toward the end and end toward the start. The pill's top edge stays put in every case: the box only grows down.
From Base UICollapsible.RootBase UI docs
disabledbooleanfalseWhether the component should ignore user interaction.
className—CSS class applied to the element, or a function that returns a class based on the component's state.
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.

MorphMenuTrigger

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

MorphMenuBrand

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

MorphMenuToggle

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

MorphMenuContent

<div>
PropTypeDefaultDescription
From Base UICollapsible.PanelBase UI docs
hiddenUntilFoundbooleanfalseAllows the browser's built-in page search to find and expand the panel contents. Overrides the keepMounted prop and uses hidden="until-found" to hide the element without removing it from the DOM.
keepMountedbooleanfalseWhether to keep the element in the DOM while the panel is hidden. This prop is ignored when hiddenUntilFound is used.
className—CSS class applied to the element, or a function that returns a class based on the component's state.
...props<div> attributes—Every other attribute goes to the <div>, with a ref.

MorphMenuList

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

MorphMenuItem

<a>
PropTypeDefaultDescription
currentbooleanfalseMarks the link of the current page: it keeps the fill and gets aria-current="page".
closeOnClickbooleantrueClose the menu when the link is pressed. Default true.
From Base UIUseRenderBase UI docs
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<a> attributes—Every other attribute goes to the <a>, with a ref.

MorphMenuListItem

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

MorphMenuItemMeta

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

MorphMenuFooter

<div>
PropTypeDefaultDescription
...props<div> attributes—Every other attribute goes to the <div>, with a ref.
  • Use it for four to eight top-level links, with a count or a New tag in MorphMenuItemMeta.
  • Use side="end" for a pill at the end of a header: the box grows toward the start and down.
  • Put actions such as Sign in and Get Pro in MorphMenuFooter: they rise in after the links.
  • For a desktop top bar with dropdown panels of link cards, use a Navigation Menu.
  • For a long tree of pages on a phone, use a Drawer.
  • To pick one value from a list, use a Morph Select.
EnterorSpaceOn the trigger, opens or closes the menu, with no motion.
Down ArroworUp ArrowMoves the focus to the next or the previous link.
HomeorEndMoves the focus to the first or the last link.
EscapeCloses the menu and gives the focus back to the trigger.
TabMoves through the links and the footer actions.

It is a Base UI Collapsible: the trigger is a button with aria-expanded, and it controls the panel of links.

Closed, the panel is inert: its links are out of the tab order and hidden from screen readers.

The focus ring of the trigger is drawn on the whole box, closed and open.

Box width
chartTooltip · a spring with a small overshoot, about 300ms · the pill grows to the panel width
Box height
chartTooltip · the same spring 1.12× slower · the height lands after the width, so the box morphs; on close it squashes a little below the pill and bounces back
Toggle and corners
chartPop · the lines meet as they turn to ±45°, a little past it, and the corners go from 26 to 22px
Links
chartTooltip · each link rises 18px on its own spring, 80ms after the open and 50ms apart; on close the last goes first, 30ms apart
Highlight
glide · one highlight slides to the link under the pointer
Keyboard
none · a keyboard open or close shows the end state at once
  1. AddedMorph Menu.
Open the release