Menu

How to get Menu

import { Menu } from 'fds/components';

Type: Component

A type of list component generally used within a navigational context.

Expects MenuItem, MenuItemWithDrop and/or MenuGroup components as direct children.

Menu handles the hovered state of its child menu items and automatically renders separation lines between MenuGroup components.

Props

# Name Type Description
1. children ReactNode
2. [maxHeight] Number | String

The maximum height of the component, sets the CSS "max-height" property.

  Default value
null
3. [onRef] Function

A callback that is called whenever a component's ref changes.

Use this callback to get a ref to (the domNode of) a component. There shouldn't be many usecases for using this prop yourself, but you might have to implement it with a given argument from a render callback somewhere.

For more information about React and "refs", check the React documentation


  Arguments
# Name Type Description
1. domNode HTMLElement

The domNode on which the component placed its ref callback attribute.

  Returns

Type: void

Related links