Keyboard Navigation

The keyboard navigation of the Menu is always available.

The Menu supports the following keyboard shortcuts:

SHORTCUTDESCRIPTION
Up Arrow
  • (For root items) Opens the item and focuses the last child.
  • (For child items) Focuses the previous item.
Down Arrow
  • (For root items) Opens the item and focuses the first child.
  • (For child items) Focuses the next item.
Left Arrow
  • (For root items) Focuses the previous item.
  • (For child items) For direct children of a root item, opens the previous root item and focuses its first child. Otherwise, closes and focuses the parent.
Right Arrow
  • (For root items) Focuses the next item.
  • (For child items) If the item has children, opens the item and focuses the first child. Otherwise, opens the next root item and focuses its first child.
HomeFocuses the first item.
EndFocuses the last item.
EnterSelects the focused item. If the item has children, opens the item and focuses the first child. If the item does not have children and has a URL, navigates to the specified URL.
SpaceSelects the focused item. If the item has children, opens the item and focuses the first child. If the item does not have children and has a URL, navigates to the specified URL.
Escape(For child items) Closes and focuses the parent.
Alphanumeric characterFocuses the next item with text starting with the character.
import React from 'react';
import ReactDOM from 'react-dom';
import { Menu } from '@progress/kendo-react-layout';
import items from './items.json';

class App extends React.Component {
    render() {
        return (
            <div>
                <Menu items={items} />
            </div>
        );
    }
}

ReactDOM.render(
    <App />,
    document.querySelector('my-app')
);

If the Menu is vertical, the arrow keys perform the following actions:

SHORTCUTDESCRIPTION
Up ArrowFocuses the previous item.
Down ArrowFocuses the next item.
Left Arrow
  • (For root items) opens the item and focuses the last child.
  • (For child items) closes and focuses the parent.
Right ArrowIf the item has children, opens the item and focuses the first child. For child items without children, opens the next root item and focuses its first child.
import React from 'react';
import ReactDOM from 'react-dom';
import { Menu, MenuItem } from '@progress/kendo-react-layout';

class App extends React.Component {
    render() {
        return (
            <Menu vertical={true} style={{ display: 'inline-block' }}>
                <MenuItem text="Item1">
                    <MenuItem text="Item1.1" />
                    <MenuItem text="Item1.2">
                        <MenuItem text="Item1.2.1" />
                        <MenuItem text="Item1.2.2" />
                    </MenuItem>
                </MenuItem>
                <MenuItem text="Item2">
                    <MenuItem text="Item2.1" />
                    <MenuItem text="Item2.2" />
                </MenuItem>
                <MenuItem text="Item3" />
            </Menu>
        );
    }
}

ReactDOM.render(
    <App />,
    document.querySelector('my-app')
);
 /