Simple Dropdown component for React
npm install @bronzetrees/react-dropdown --save
import Dropdown from '@bronzetrees/react-dropdown';
ReactDOM.render(
<Dropdown
menu={
<Dropdown.Menu>
<Dropdown.Item>item1</Dropdown.Item>
<Dropdown.Item>item2</Dropdown.Item>
</Dropdown.Menu>
}
menuAlign="bottom"
>
<span>dropdown link</span>
</Dropdown>,
mountNode
);
name | type | default | description |
---|---|---|---|
menuAlign | String | 'bottom-end' | placement of pop menu |
trigger | String | 'hover' | the trigger mode which executes the dropdown action. |
@bronzetrees/react-dropdown is released under the MIT license.