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.
MenuItem
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 Variable | Computed Value |
---|---|
| |
| |
| |
| |
| |
Props API#
- className
string
Specifies class name to append to the base element
- arrowKeyNavigationSelector
string
Default'a:not(:disabled),button:not(:disabled),input:not(:disabled)'Specifies the CSS selector string that indicates to which elements the user can navigate using the arrow keys
- as
elementType
Default'div'Specifies the base element
- children
node
DefaultnullSpecifies the content of the menu
- defaultSelected
bool
DefaultfalseSpecifies that this
MenuItem
is selected inside theSelectMenu
- className
string
Specifies class name to append to the base element
- children
node
DefaultnullSpecifies the content of the
MenuItem
- as
elementType
Default'button'Specifies the base element
- iconBefore
element
|elementType
Specifies the jsx before the content of the
MenuItem
- iconAfter
element
|elementType
Specifies the jsx after the content of the
MenuItem
Usage Insights#
Menu
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-course-authoring | 22.8.1 | 3 | |
frontend-app-learning | 22.10.0 | 1 | |
prospectus | 20.46.2 | 1 |
MenuItem
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-admin-portal | 21.13.1 | 1 | |
frontend-app-course-authoring | 22.8.1 | 14 | |
prospectus | 20.46.2 | 1 |