EllipsisMenuButton
EllipsisMenuButton is a button with a trailing ellipsis icon, used as the trigger for overflow menus and dropdowns.
Want to skip the docs? Try our MCP Server
#
Documentation
#
#
Usage
#
Use EllipsisMenuButton with MenuTrigger asChild to open overflow menus. Remember to provide an aria-label since the button has no visible text.
import { IconArrowRightFromBracket, IconUser } from "@optiaxiom/icons";
import {
EllipsisMenuButton,
Menu,
MenuContent,
MenuTrigger,
} from "@optiaxiom/react";
export function App() {
return (
<Menu
options={[
{
addon: <IconUser />,
label: "View profile",
},
{
addon: <IconArrowRightFromBracket />,
label: "Logout",
},
]}
>
<MenuTrigger asChild>
<EllipsisMenuButton appearance="subtle" aria-label="My account" />
</MenuTrigger>
<MenuContent />
</Menu>
);
}#
Related
#
#
Props
#
#
EllipsisMenuButton
#
import { EllipsisMenuButton } from "@optiaxiom/react";
// or
import { EllipsisMenuButton } from "@optiaxiom/react/ellipsis-menu-button";Supports all Box props in addition to its own. Renders a <div> element.
Prop |
|---|
addonAfterDisplay content inside the button after
|
addonBeforeDisplay content inside the button before
|
appearanceControl the appearance by selecting between the different button types.
|
asChildChange the default rendered element for the one passed as a child, merging their props and behavior. Read the Composition guide for more details.
|
children
|
className
|
disabledWhether the button is disabled.
|
iconDisplay an icon before or after the button content or omit
|
iconPositionControl whether to show the icon before or after the button content.
|
loadingShow a loading spinner and mark the button
|
sizeControl the size of the button.
|
squareWhether button should have square shape (an icon-only button with no label).
|
typeThe default behavior of the button.
|
#
Accessibility
#
#
Labels
#
- Without
childrenthe button shows only the ellipsis icon. Give it anaria-labelnaming what the menu acts on, such as “Article actions”. Button logs a console error when the label is missing.
#
Changelog
#
#
0.12.1
#
- Added component