Skip to content

Menu

<ts-menu> vv0.4.0

The ts-menu component.

Open in Storybook for interactive demos.

<ts-menu placement="bottom-start" trigger="click">Content</ts-menu>
PropertyAttributeTypeDefaultDescription
openopenbooleanfalseWhether the menu dropdown is open.
placementplacement"bottom-end" | "bottom-start" | "top-end" | "top-start"'bottom-start'Placement of the dropdown relative to the trigger.
triggertrigger"click" | "hover"'click'How the menu is triggered.
EventDetailBubblesComposedDescription
tsClosevoidYesYesEmitted when the menu closes.
tsOpenvoidYesYesEmitted when the menu opens.
NameDescription
*(default)*Default slot for ts-menu-item children.
triggerThe element that opens the menu (e.g., a button).

Use ::part() to style internal elements:

PartDescription
panelThe dropdown panel container.
ts-menu::part(panel) {
/* your custom styles */
}
<ts-menu placement="bottom-start" trigger="click">Content</ts-menu>
import { TsMenu } from '@tessera-ui/react';
<TsMenu placement="bottom-start" trigger="click">Content</TsMenu>