Dropdown
Leave feedbackThis is a pass through component from React-Bootstrap.
See React-Bootstrap for documentation.
Basic Usage
Any Paragon component or export may be added to the code example.
Advanced Usage
Any Paragon component or export may be added to the code example.
With IconButton
You can use Dropdown.Toggle with IconButton component, note that all props you provide to Dropdown.Toggle will get passed down to the IconButton.
Any Paragon component or export may be added to the code example.
Dropdown.Deprecated
Any Paragon component or export may be added to the code example.
(Deprecated) with icon element
Any Paragon component or export may be added to the code example.
(Deprecated) basic usage
Any Paragon component or export may be added to the code example.
(Deprecated) menu items as elements
Any Paragon component or export may be added to the code example.
(Deprecated) with icon element
Any Paragon component or export may be added to the code example.
Theme Variables (SCSS)#
$dropdown-min-width: 18rem !default;$dropdown-padding-x: 0 !default;$dropdown-padding-y: .5rem !default;$dropdown-spacer: .125rem !default;$dropdown-font-size: $font-size-base !default;$dropdown-color: $body-color !default;$dropdown-bg: $white !default;$dropdown-border-color: rgba($black, .15) !default;$dropdown-border-radius: $border-radius !default;$dropdown-border-width: $border-width !default;$dropdown-inner-border-radius: calc(#{$dropdown-border-radius} - #{$dropdown-border-width}) !default;$dropdown-divider-bg: theme-color("gray", "background") !default;$dropdown-divider-margin-y: calc($spacer / 2) !default;$dropdown-box-shadow: 0 .5rem 1rem rgba($black, .175) !default;$dropdown-link-color: theme-color("gray", "dark-text") !default;$dropdown-link-hover-color: darken(theme-color("gray", "dark-text"), 5%) !default;$dropdown-link-hover-bg: $light-300 !default;$dropdown-link-active-color: $component-active-color !default;$dropdown-link-active-bg: $component-active-bg !default;$dropdown-link-disabled-color: theme-color("gray", "light-text") !default;$dropdown-item-padding-y: .25rem !default;$dropdown-item-padding-x: 1rem !default;$dropdown-header-color: theme-color("gray", "light-text") !default;$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;
Props API#
- children
node
- typeDefault'a'
string - children
node - classNameDefaultnull
string
- children
node
- children
node - classNameDefault'btn-light'
string
- as
elementTypeDefaultButtonSpecifies the base element.
- bsPrefix
stringDefault'dropdown-toggle'Overrides underlying component base CSS class name.
- id
string|numberRequiredAn html id attribute, necessary for assistive technologies, such as screen readers.
Usage Insights#
Dropdown
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 3 | |
| frontend-app-discussions | 20.44.0 | 1 | |
| frontend-app-learner-dashboard | 20.32.0 | 2 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 5 | |
| frontend-app-learning | 20.28.4 | 3 | |
| frontend-app-library-authoring | 20.45.5 | 2 | |
| frontend-app-profile | 20.45.5 | 1 | |
| frontend-app-publisher | 20.28.5 | 1 | |
| frontend-app-support-tools | 20.45.0 | 4 | |
| frontend-component-header-edx | 20.45.5 | 2 | |
| frontend-component-header | 20.45.5 | 2 | |
| catalog-search | 20.45.0 | 2 | |
| frontend-lib-content-components | 20.45.0 | 6 | |
| prospectus | 20.45.2 | 2 |
DropdownButton
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-discussions | 20.44.0 | 1 | |
| frontend-app-learner-record | 20.45.0 | 1 | |
| prospectus | 20.45.2 | 2 |
DropdownDivider
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-discussions | 20.44.0 | 1 | |
| frontend-app-learner-dashboard | 20.32.0 | 2 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 2 |
DropdownHeader
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-learner-dashboard | 20.32.0 | 1 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 1 |
DropdownItem
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 9 | |
| frontend-app-discussions | 20.44.0 | 5 | |
| frontend-app-learner-dashboard | 20.32.0 | 9 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 11 | |
| frontend-app-learner-record | 20.45.0 | 1 | |
| frontend-app-learning | 20.28.4 | 3 | |
| frontend-app-library-authoring | 20.45.5 | 4 | |
| frontend-app-profile | 20.45.5 | 2 | |
| frontend-app-publisher | 20.28.5 | 1 | |
| frontend-app-support-tools | 20.45.0 | 8 | |
| frontend-component-header-edx | 20.45.5 | 8 | |
| frontend-component-header | 20.45.5 | 8 | |
| catalog-search | 20.45.0 | 5 | |
| frontend-lib-content-components | 20.45.0 | 13 | |
| prospectus | 20.45.2 | 3 |
DropdownMenu
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 3 | |
| frontend-app-discussions | 20.44.0 | 1 | |
| frontend-app-learner-dashboard | 20.32.0 | 2 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 5 | |
| frontend-app-learning | 20.28.4 | 3 | |
| frontend-app-library-authoring | 20.45.5 | 2 | |
| frontend-app-profile | 20.45.5 | 1 | |
| frontend-app-publisher | 20.28.5 | 1 | |
| frontend-app-support-tools | 20.45.0 | 4 | |
| frontend-component-header-edx | 20.45.5 | 2 | |
| frontend-component-header | 20.45.5 | 2 | |
| catalog-search | 20.45.0 | 2 | |
| frontend-lib-content-components | 20.45.0 | 6 | |
| prospectus | 20.45.2 | 2 |
DropdownToggle
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-admin-portal | 20.39.2 | 3 | |
| frontend-app-discussions | 20.44.0 | 1 | |
| frontend-app-learner-dashboard | 20.32.0 | 2 | |
| frontend-app-learner-portal-enterprise | 20.45.1 | 5 | |
| frontend-app-learning | 20.28.4 | 3 | |
| frontend-app-library-authoring | 20.45.5 | 2 | |
| frontend-app-profile | 20.45.5 | 1 | |
| frontend-app-publisher | 20.28.5 | 1 | |
| frontend-app-support-tools | 20.45.0 | 4 | |
| frontend-component-header-edx | 20.45.5 | 2 | |
| frontend-component-header | 20.45.5 | 2 | |
| catalog-search | 20.45.0 | 2 | |
| frontend-lib-content-components | 20.45.0 | 6 | |
| prospectus | 20.45.2 | 2 |