On this page
Angular Dropdown Component
Angular Dropdown component allows you to toggle contextual overlays for displaying lists, links, and more html elements.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
And putting it to use in a navbar:
Loading...
Loading...
Loading...
RTL
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Heads up! Dropdowns are positioned thanks to Popper.js.
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
```typescript
import { DropdownModule } from '@coreui/angular';
@NgModule({
imports: [DropdownModule,]
})
export class AppModule() { }
```
| name | description | type | default |
| ---- | ----------- | ---- | ------- |
| `alignment` | Set alignment of dropdown menu. | `string` | _undefined_ |
| `dark` | Sets a darker color scheme to match a dark navbar. | `boolean` | _false_ |
| `direction` | Sets a specified direction and location of the dropdown menu. | `center` \| `dropup` \| 'dropup-center' \| `dropend` \| `dropstart` |_undefined_|
| `placement` | Describes the placement of your component after Popper.js has applied all the modifiers that may have flipped or altered the originally provided placement property. | `Placements` |_bottom-start_|
| `popper` | If you want to disable dynamic positioning set this property to `false`. | `boolean` |_true_|
| `variant` | Set the dropdown variant to an btn-group, dropdown, input-group, and nav-item. | `btn-group` \| `dropdown` \| `input-group` \| `nav-item` |_dropdown_|
| `visible` | Toggle the visibility of dropdown menu component. | `boolean` |_false_|
| `autoClose` |
##### Outputs
Configure the auto close behavior of the dropdown:
- `true` - the dropdown will be closed by clicking outside or inside the dropdown menu.
- `false` - the dropdown will be closed by clicking the toggle button and manually calling hide or toggle method. (Also will not be closed by pressing esc key)
- `inside` - the dropdown will be closed (only) by clicking inside the dropdown menu.
- `outside` - the dropdown will be closed (only) by clicking outside the dropdown menu.
| name | description | type |
| ---- | ----------- | ---- |
| `visibleChange` | Event emitted on `visible` change. | `boolean` |
### cDropdownClose
_directive_
##### Inputs
| name | description | type | default |
| ---- | ----------- | ---- | ------- |
| `disabled` | Toggle the disabled state for the cDropdownClose host element. | `boolean` | _undefined_ |
### cDropdownDivider
_directive_
### cDropdownHeader
_directive_
### cDropdownItem
_directive_
##### Inputs
| name | description | type | default |
| ---- | ----------- | ---- | ------- |
| `active` | Toggle the active state for the dropdown item. | `boolean` | _undefined_ |
| `autoClose` | Close dropdown menu on cDropdownItem click. | `boolean` | _true_ |
| `disabled` | Toggle the disabled state for the dropdown item. | `boolean` | _undefined_ |
### cDropdownItemPlain
_directive_
### cDropdownMenu
_directive_
##### Inputs
| name | description | type | default |
| ---- | ----------- | ---- | ------- |
| `dark` | Sets a darker color scheme to match a dark navbar. | `boolean` | _true_ |
### cDropdownToggle
_directive_
##### Inputs
| name | description | type | default |
| ---- | ----------- | ---- | ------- |
| `caret` | Enables pseudo element caret on toggler. | `boolean` | _true_ |
| `split` | Create split button dropdowns. | `boolean` | _undefined_ |