The Menu is a compound component with three parts:
Part Description Menu.RootContainer that manages layout, state, and theming Menu.IndicatorAnimated background that morphs between active items using spring physics and SVG gooey effect. Rendered automatically inside Menu.Root — you usually don’t need to include it manually. Menu.ItemIndividual interactive navigation item
Prop Type Default Description orientationMenuOrientation"horizontal"Layout direction of the menu items variantMenuVariant"pill"Visual style of the active indicator themeMenuTheme"dark"Color theme activeIdstring | null— Controlled active item ID. Use with onActiveChange for controlled state. defaultActiveIdstring | null— Initial active item for uncontrolled usage onActiveChange(id: string) => void— Callback when the active item changes (React/Svelte). Vue uses @active-change, Angular uses (activeChange). springSpringConfigcore default Spring physics configuration for the indicator animation roundnessnumber— Border radius factor for the indicator blurnumber— Gooey blur amount for the indicator fillstring— Color override applied to the menu background and the active indicator. Prefer this over manually styling Menu.Indicator. classNamestring— Custom CSS class for the root element
Prop Type Default Description idstringrequired Unique identifier for this item. Used to track the active state. disabledbooleanfalseDisables interaction and dims the item classNamestring— Custom CSS class onClickMouseEventHandler— Click handler (in addition to the active state change) childrenReactNoderequired Label content rendered inside the item
Prop Type Default Description fillstring— Override the indicator background color blurnumber— Override the gooey blur amount classNamestring— Custom CSS class
import { Menu } from " @fluix-ui/react " ;
const [ active , setActive ] = useState ( " home " );
onActiveChange = { setActive }
< Menu.Item id = " home " > Home </ Menu.Item >
< Menu.Item id = " features " > Features </ Menu.Item >
Uses compound components. State change callback via onActiveChange prop.
import { ref } from " vue " ;
import { Menu } from " @fluix-ui/vue " ;
const active = ref ( " home " );
@active-change = " active = $event "
< Menu.Item id = " home " > Home </ Menu.Item >
< Menu.Item id = " features " > Features </ Menu.Item >
Event Payload Description @active-changestringEmitted when the active item changes
import { Menu } from " @fluix-ui/svelte " ;
let active = $ state ( " home " );
onActiveChange = { ( id ) => active = id }
< Menu . Item id = " home " > Home </ Menu . Item >
< Menu . Item id = " features " > Features </ Menu . Item >
Uses Svelte 5 runes ($state). State change callback via onActiveChange prop.
import { Component } from " @angular/core " ;
import { FluixMenuComponent } from " @fluix-ui/angular " ;
imports: [FluixMenuComponent],
(activeChange)="active = $event"
<fluix-menu-item menuId="home">Home</fluix-menu-item>
<fluix-menu-item menuId="features">Features</fluix-menu-item>
export class AppComponent {
Name Type Description orientation"vertical" | "horizontal"Layout direction variant"pill" | "tab"Visual style themeMenuThemeColor theme activeIdstring | nullControlled active item springSpringConfigPhysics config roundnessnumberBorder radius factor blurnumberIndicator blur fillstringBackground override activeChangeEventEmitter<string>Active item change event
The Vanilla adapter uses a factory function instead of components.
Parameter Type Description hostHTMLElementDOM element to mount the menu into optionsMenuOptionsConfiguration object (see below)
Option Type Description orientationMenuOrientationLayout direction variantMenuVariantVisual style themeMenuThemeColor theme itemsArray<{ id: string; label: string; disabled?: boolean }>Menu items to render activeIdstring | nullInitial active item springSpringConfigPhysics configuration roundnessnumberBorder radius factor blurnumberIndicator blur fillstringBackground override onActiveChange(id: string) => voidActive change callback
Method Signature Description setActive(id: string) => voidProgrammatically set the active item getActive() => string | nullGet the current active item ID update(options: Partial<MenuOptions>) => voidUpdate menu configuration destroy() => voidRemove the menu and clean up event listeners
import { createMenu } from " @fluix-ui/vanilla " ;
const menu = createMenu (document . getElementById ( " nav " ) , {
orientation: " horizontal " ,
{ id: " overview " , label: " Overview " },
{ id: " analytics " , label: " Analytics " },
{ id: " settings " , label: " Settings " },
onActiveChange : ( id ) => {
console . log ( " Active tab: " , id) ;
menu . setActive ( " analytics " );
type MenuOrientation = " horizontal " | " vertical " ;
type MenuVariant = " pill " | " tab " ;
pill — Rounded background indicator that slides behind the active item.
tab — Underline-style indicator below (horizontal) or beside (vertical) the active item.
type MenuTheme = " dark " | " light " | string ;
Accepts "dark", "light", or any custom string. Custom strings map to CSS attribute selectors — see Theming .
Controls the spring physics of the indicator animation. Higher stiffness makes it snappier, higher damping reduces oscillation, higher mass makes it heavier/slower.
Override these on [data-fluix-menu] to customize the appearance:
Variable Default Description --fluix-menu-bg#1a1a2eMenu container background --fluix-menu-color#a0a0b0Inactive item text color --fluix-menu-active-color#ffffffActive item text color --fluix-menu-indicatorrgba(255, 255, 255, 0.1)Indicator fill color
--fluix-menu-bg : # 0f172a ;
--fluix-menu-color : # 94a3b8 ;
--fluix-menu-active-color : # f1f5f9 ;
--fluix-menu-indicator : rgba ( 99 , 102 , 241 , 0.2 );
Each Menu.Item renders a button element with appropriate focus management.
Keyboard navigation with arrow keys moves focus between items.
The active indicator is purely decorative and hidden from assistive technology.
Disabled items are skipped during keyboard navigation.