Menu
<ts-menu> vv0.4.0
The ts-menu component.
Open in Storybook for interactive demos.
Preview
Section titled “Preview”<ts-menu placement="bottom-start" trigger="click">Content</ts-menu>Properties
Section titled “Properties”| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
open | open | boolean | false | Whether the menu dropdown is open. |
placement | placement | "bottom-end" | "bottom-start" | "top-end" | "top-start" | 'bottom-start' | Placement of the dropdown relative to the trigger. |
trigger | trigger | "click" | "hover" | 'click' | How the menu is triggered. |
Events
Section titled “Events”| Event | Detail | Bubbles | Composed | Description |
|---|---|---|---|---|
tsClose | void | Yes | Yes | Emitted when the menu closes. |
tsOpen | void | Yes | Yes | Emitted when the menu opens. |
| Name | Description |
|---|---|
*(default)* | Default slot for ts-menu-item children. |
trigger | The element that opens the menu (e.g., a button). |
CSS Parts
Section titled “CSS Parts”Use ::part() to style internal elements:
| Part | Description |
|---|---|
panel | The 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>