@bdt-component-library/menu
v0.4.5
Published
Menu component
Downloads
27
Readme
Menu Component
About
This is a component published as its own package from our component library monorepo: https://github.com/BenefitsDataTrust/ui-components. Setup instructions, as well as higher-level goals and concerns can be found from the main project README.
Description
Handles display of menus, used to display a set of options, similar to select fields, but used for more general purpose interactions like navigation.
This component is intended to be used with the Option
component to render the options, but it will accept any valid react elements as children.
- https://zeroheight.com/990ea04ab/p/16f49b-menu
API
| prop | type | required | default | explanation | |-----------|--------|----------|---------|--------------| | className | string | no | "" | Adds an optional classname to the component | | children | React element | React element[] | yes | n/a | Handles the Menu option contents | | size | enum("compact", "default") | no | false | Determines compact or default variant for menu | | name | string | yes | no | Determines the menu name displayed as the menu button text | | leadingIcon | React element OR false | no | false | Determines the leading icon that displays in the menu button (if given an element to display) | | variant | enum("solid", "outlined", "text", "inverted") | no | "solid" | Determines the menu button variant type | | align | enum("left", "right") | no | "left" | Determines the side of the options that the menu button displays | | classOverrides | { status: string } | no | {} | Allows specifying classes to override other specific classes in the component |