AriaSubMenu
type AriaSubMenu = object &
| {
items: AriaMenuItem[];
content?: never;
}
| {
content: React.ReactNode | (helpers) => React.ReactNode;
items?: never;
};
A submenu that opens in place inside an AriaMenu when its parent item is clicked. A submenu can either render a nested list of AriaMenuItem (which can themselves open further submenus) or arbitrary React content. When a submenu is open, a back button is rendered at the top of the menu to return to the previous level.
Type Declaration
| Name | Type | Description |
|---|---|---|
title? | React.ReactNode | Optional title shown next to the back button at the top of the submenu. |
titleTestId? | string | The test id applied to the submenu title. |
testId? | string | The test id applied to the submenu container. |
backButtonLabel? | string | Aria label for the back button rendered at the top of the submenu. Overrides the menu-level backButtonLabel. |
backButtonTestId? | string | The test id for the back button rendered at the top of the submenu. |