Skip to main content

Dropdown

See React Bootstrap/Dropdowns for full documentation and props.

Dropdowns in react-bootstrap provide some level of accessibility but in most cases roles or ids will need to be specifically associated with the menu elements themselves.

Dropdowns can be created with a Dropdown.Toggle component or a DropdownButton component.

Result
Loading...
Live Editor

With headers and dividers

Result
Loading...
Live Editor

With multiple columns

Columns can be created with layout options (flex, grid, etc.).

Result
Loading...
Live Editor

With non-interactive items

The Dropdown.ItemText component can be used to create non-interactive items.

Result
Loading...
Live Editor

With form inputs

Dropdown.Items are anchor tags by default, so it's important to use Dropdown.ItemText when putting inputs inside them to make sure clicking it doesn't append a # to the end of the page URL and scroll to the top of the page.

Result
Loading...
Live Editor
Result
Loading...
Live Editor

With nested items

Result
Loading...
Live Editor

Split Dropdowns

Result
Loading...
Live Editor

Size variants

The Dropdown.Menu component can be sized with the size prop.

Result
Loading...
Live Editor

With ListGroupItem

It is possible to use the ListGroup.Item.Template, Header, and Body components to create more complex dropdowns with headers, descriptions, icons, and other details. See ListGroup for more options.

Result
Loading...
Live Editor

Other examples

Result
Loading...
Live Editor

As a checklist

Result
Loading...
Live Editor

Analytics

The DropdownItem component is trackable through Kyber Analytics. This is the default analytics config.

export default {
value: 'DropdownItem',
actions: {
onClick: { type: 'DROPDOWNITEM_CLICK', payload: 'Click' },
},
};

Props

🛑 We recommend using ListGroup.Item.Template, ListGroup.Item.Header, and ListGroup.Item.Body to create more complex dropdown items. These components provide more customization and better fit for the Design System.

MultiLineDropdownItem

The MultiLineDropdownItem component is trackable through Kyber Analytics. This is the default analytics config.

export default {
value: 'MultiLineDropdownItem',
actions: {
onClick: { type: 'DROPDOWNITEM_CLICK', payload: 'Click' },
},
};
```