# Dropdown
```rust demo
let message = use_message();
let on_select = move |key: String| {
match key.as_str() {
"facebook" => message.create( "Facebook".into(), MessageVariant::Success, Default::default(),),
"twitter" => message.create( "Twitter".into(), MessageVariant::Warning, Default::default(),),
_ => ()
}
};
view! {
}
```
### Placement
```rust demo
use leptos_meta::Style;
let on_select = move |key| println!("{}", key);
view! {
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
"Content"
}
```
### Dropdown Props
| Name | Type | Default | Description |
| ------------ | ----------------------------------- | ---------------------------- | ------------------------------------------- |
| class | `OptionalProp>` | `Default::default()` | Addtional classes for the dropdown element. |
| on_select | `Callback` | | Called when item is selected. |
| trigger_type | `DropdownTriggerType` | `DropdownTriggerType::Click` | Action that displays the dropdown. |
| placement | `DropdownPlacement` | `DropdownPlacement::Bottom` | Dropdown placement. |
| children | `Children` | | The content inside dropdown. |
### DropdownItem Props
| Name | Type | Default | Description |
| -------- | -------------------------------------------- | -------------------- | ------------------------------------------------ |
| class | `OptionalProp>` | `Default::default()` | Addtional classes for the dropdown item element. |
| key | `MaybeSignal` | `Default::default()` | The key of the dropdown item. |
| label | `MaybeSignal` | `Default::default()` | The label of the dropdown item. |
| icon | `OptionalMaybeSignal` | `None` | The icon of the dropdown item. |
| disabled | `MaybeSignal` | `false` | Whether the dropdown item is disabled. |
### Dropdown Slots
| Name | Default | Description |
| --------------- | ------- | ------------------------------------------------ |
| DropdownTrigger | `None` | The element or component that triggers dropdown. |
### DropdownTriger Props
| Name | Type | Default | Description |
| ------------ | ----------------------------------- | ---------------------------- | -------------------------------------------------- |
| class | `OptionalProp>` | `Default::default()` | Addtional classes for the dropdown trigger element. |
| children | `Children` | | The content inside dropdown trigger. |