Top
DropdownButton - Getting started
DropdownButton
Zippytech React Toolkit is distributed via npm. So getting it installed is as easy as:
$ npm install @zippytech/react-toolkit --save
Or, if you are using yarn you have to run:
$ yarn add @zippytech/react-toolkit
To start using the <DropdownButton /> component, all you need to import is React, the code and styles of the component itself: @zippytech/react-toolkit/DropdownButton and @zippytech/react-toolkit/DropdownButton/index.css.
You can choose the position of the dropdown, using the alignPositions prop.
The Menu has alignTo set to button region.
For more information on this prop see alignPositions on Menu.
It has the following default: 'tl-bl', 'tr-br', 'bl-tl', 'br-tr', 'tl-tr', 'bl-br', 'tr-tl', 'tr-br'
This is a basic setup for a <DropdownButton />. In the following sections we'll explore how to use the <DropdownButton /> in various scenarios, supported props, theming, etc.