npm_versionnpm Paragon package page

An arrow-key navigable Menu which consists of MenuItems. A Menu can be employed to produce its common variants, including dropdown menus, select menus, and others. Menus are keyboard navigable with both tab and arrow keys.

A MenuItem is its own distinct component that is used by any kind of menu overlays i.e. dropdown menu and navigation menu.

Any Paragon component or export may be added to the code example.

With Form

A Menu can include things like forms.

Any Paragon component or export may be added to the code example.

With Modal

A Menu can be implemented to appear inside a modalpopup for a wide variety of use cases. The Modal brings focus to the first menu element upon the click of the trigger, and can be escaped on click away or key press.

Any Paragon component or export may be added to the code example.

Theme Variables#

CSS VariableComputed Value










Props API#

Menu Props API
  • className string

    Specifies class name to append to the base element

  • arrowKeyNavigationSelector string

    Specifies the CSS selector string that indicates to which elements the user can navigate using the arrow keys

    Default'a:not(:disabled),button:not(:disabled),input:not(:disabled)'
  • as ElementType

    Specifies the base element

    Default'div'
  • children ReactNode

    Specifies the content of the menu

MenuItem Props API
  • defaultSelected boolean

    Specifies that this MenuItem is selected inside the SelectMenu

    Defaultfalse
  • className string

    Specifies class name to append to the base element

  • children ReactNode Required

    Specifies the content of the MenuItem

  • as ElementType

    Specifies the base element

    Default'button'
  • iconBefore ReactElement | ElementType

    Specifies the jsx before the content of the MenuItem

  • iconAfter ReactElement | ElementType

    Specifies the jsx after the content of the MenuItem

Usage Insights#

Menu

Project NameParagon VersionInstance Count
frontend-app-course-authoring23.14.93

MenuItem

Project NameParagon VersionInstance Count
frontend-app-course-authoring23.14.99
frontend-app-publisher23.14.81