Dropdown
# FxDropdown
Collapse actions or menus into a dropdown list.
# Basic Usage
Hover over the dropdown to reveal more actions.
Copy
# Trigger Object
Button can be used to trigger dropdown menu.
Copy
# Trigger Method
Configure click or hover activation.
Copy
# Menu Hide Method
Configure using the hide-on-click property.
Copy
# Command Events
Clicking menu items triggers events that can be handled based on the item's key.
Copy
# Different Sizes
Dropdown provides three additional sizes besides the default.
Copy
# Dropdown Attributes
| Parameter | Description | Type | Options | Default |
|---|---|---|---|---|
| type | Menu button type, same as Button component (only effective when split-button is true) | string | — | — |
| size | Menu size, also affects trigger button when split-button is true | string | medium / small / mini | — |
| split-button | Display trigger element as button group | boolean | — | false |
| placement | Menu popup position | string | top/top-start/top-end/bottom/bottom-start/bottom-end | bottom-end |
| trigger | Trigger behavior | string | hover, click | hover |
| hide-on-click | Whether to hide menu after clicking menu item | boolean | — | true |
| show-timeout | Delay before showing dropdown (only effective when trigger is hover) | number | — | 250 |
| hide-timeout | Delay before hiding dropdown (only effective when trigger is hover) | number | — | 150 |
| tabindex | Dropdown component's tabindex (opens new window) | number | — | 0 |
| disabled | Disable state | boolean | — | — |
# Dropdown Slots
| Name | Description |
|---|---|
| — | Element that triggers dropdown display. Must be an element or component |
| dropdown | Dropdown list, typically the <fx-dropdown-menu> component |
# Dropdown Events
| Event Name | Description | Parameters |
|---|---|---|
| click | Callback when left button is clicked (when split-button is true) | — |
| command | Callback when menu item is clicked | dropdown-item's command |
| visible-change | Triggered when dropdown appears/hides | true when appears, false when hides |
# Dropdown Menu Item Attributes
| Parameter | Description | Type | Options | Default |
|---|---|---|---|---|
| command | Command | string/number/object | — | — |
| disabled | Disabled state | boolean | — | false |
| divided | Divider line | boolean | — | false |
| icon | Icon class name | string | — | — |