Compose the trigger and the links as parts; each link is a real a.
site-menu.tsx
MorphMenu
<div>| Prop | Type | Default | Description | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| open | boolean | — | Whether the menu is open (controlled). | |||||||
| default | boolean | — | Whether the menu is open at first (uncontrolled). Default false. | |||||||
| on | — | 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 | ||||||||||
| disabled | boolean | false | Whether the component should ignore user interaction. | |||||||
| class | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
MorphMenuBrand
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
MorphMenuToggle
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
MorphMenuContent
<div>| Prop | Type | Default | Description |
|---|---|---|---|
From Base UICollapsible.PanelBase UI docs | |||
| keep | boolean | false | Whether to keep the element in the DOM while the panel is hidden. This prop is ignored when hiddenUntilFound is used. |
| class | — | 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <ul> attributes | — | Every other attribute goes to the <ul>, with a ref. |
MorphMenuItem
<a>| Prop | Type | Default | Description |
|---|---|---|---|
| current | boolean | false | Marks the link of the current page: it keeps the fill and gets aria-current="page". |
| close | boolean | true | Close 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>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <li> attributes | — | Every other attribute goes to the <li>, with a ref. |
MorphMenuItemMeta
<span>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <span> attributes | — | Every other attribute goes to the <span>, with a ref. |
MorphMenuFooter
<div>| Prop | Type | Default | Description |
|---|---|---|---|
| ...props | <div> attributes | — | Every other attribute goes to the <div>, with a ref. |
| EnterorSpace | On the trigger, opens or closes the menu, with no motion. |
|---|---|
| Down ArroworUp Arrow | Moves the focus to the next or the previous link. |
| HomeorEnd | Moves the focus to the first or the last link. |
| Escape | Closes the menu and gives the focus back to the trigger. |
| Tab | Moves through the links and the footer actions. |













