# components/RowActionsMenu (zidane-ui)

Import: `import { … } from 'zidane-ui'`. Source: [ui/src/components/RowActionsMenu.tsx](https://github.com/Tahul/zidane/blob/main/ui/src/components/RowActionsMenu.tsx).

## Components

### `RowActionsMenu`

Component.

Mounted from its first open on (then kept, for the exit and the next
open): every sidebar row and transcript turn carries one, and a closed
menu's surface, presence and dismiss listeners per row were most of what
mounting a list of rows cost.

```ts
function RowActionsMenu(props: RowActionsMenuProps): Element | null
```

**Parameters**

- `props` (`RowActionsMenuProps`): Component props: `open`, `onClose`, `items`, and either `anchorRef` or `position`.

**Returns** `Element | null`

**Props**

- `anchorRef?` (`RefObject<HTMLElement | null>`): Trigger to anchor against (3-dots path). Ignored when `position` is set.
- `className?` (`string`): Extra classes on the root element.
- `items` (`readonly RowActionItem[]`): The rows, in order.
- `onClose` (`() => void`): Called on an outside press, or when a row is picked.
- `open` (`boolean`): Whether the menu is shown.
- `position?` (`{ x: number; y: number } | null`): Viewport point for the menu's top-left (right-click path). Wins over `anchorRef`.
- `style?` (`CSSProperties`): Inline styles on the root element, merged after the component's own.

Source: [ui/src/components/RowActionsMenu.tsx:151](https://github.com/Tahul/zidane/blob/main/ui/src/components/RowActionsMenu.tsx#L151)

## Interfaces

### `RowActionsMenuProps`

Interface.

Props for [`RowActionsMenu`](https://zidane.si/docs/reference/ui-components-row-actions-menu.md#RowActionsMenu).

```ts
interface RowActionsMenuProps
```

**Properties**

- `anchorRef?` (`RefObject<HTMLElement | null>`): Trigger to anchor against (3-dots path). Ignored when `position` is set.
- `className?` (`string`): Extra classes on the root element.
- `items` (`readonly RowActionItem[]`): The rows, in order.
- `onClose` (`() => void`): Called on an outside press, or when a row is picked.
- `open` (`boolean`): Whether the menu is shown.
- `position?` (`{ x: number; y: number } | null`): Viewport point for the menu's top-left (right-click path). Wins over `anchorRef`.
- `style?` (`CSSProperties`): Inline styles on the root element, merged after the component's own.

Source: [ui/src/components/RowActionsMenu.tsx:81](https://github.com/Tahul/zidane/blob/main/ui/src/components/RowActionsMenu.tsx#L81)

## Types

### `RowActionItem`

Type.

One entry of a [`RowActionsMenu`](https://zidane.si/docs/reference/ui-components-row-actions-menu.md#RowActionsMenu): a row that runs an action, or one that opens more rows beside it.

```ts
type RowActionItem = RowActionLeaf | RowActionParent
```

Source: [ui/src/components/RowActionsMenu.tsx:78](https://github.com/Tahul/zidane/blob/main/ui/src/components/RowActionsMenu.tsx#L78)
