SelectMenu transforms the default <select> element into a customizable control. The original <select> element's state is maintained for form submission.
npm install select-menu--p14SelectMenu transforms the default element into a customizable control. The original element's state is maintained for form submission.
Launch yarn add select-menu--p14 command
To use it you need to :
- import SelectMenu from 'select-menu--p14';
- Wrap your (with an id) and / elements in the component.
``
import SelectMenu from 'select-menu--p14';
`
component :- theme: theme of the component, default: "default", "light" or "dark" / _optional_
- imgsrc: source of an icon/picture / _optional_
- imgsize: size: “s”, “m”(default) or “l” when an imgsrc is specified / _optional_
- UP or LEFT: Move focus to the previous option.
- DOWN or RIGHT: Move focus to the next option.
- END or PAGE DOWN: Move to the last option.
- HOME or PAGE UP: Move to the first option.
- SPACE or ALT/OPTION + DOWN: Open the menu.
- ESCAPE or ALT/OPTION + UP: Close the menu.
- ENTER or SPACE: Select the currently focused option and close the menu.
You can easily change the style directly in the styles.css file