Select
Is an alternative to the <select>
element.
Common usage
Select
must be wrapped withuseSelect
to make the element interactive. Using the component with a custom hook is encouraged.
import { Select, useSelect, styled } from '@atlasgroup/react-atlantic';import { wrap } from '@atlasgroup/react-wrap';// Optionalconst ProjectSpecificStyledSelect = styled(Select)`// ... Project specific styles ...`;const ProjectSpecificSelect = wrap(ProjectSpecificStyledSelect, useSelect);
Basic usage
Sizes
Full width
Other views
Multi
SelectMulti
should be wrapped withuseSelectMulti
.
Known issues
- [#1] - Unnecessary wrapping of the component in each project
- [#2] - The component is not accessible via keyboard (might be useful for accessibility)
- [#3] - Third party component is used