Dropdown
Expand related actions from a single trigger.
Usage guide
#Use to collect secondary commands behind a button. Use Select for choosing values in a form.
Build the trigger
Put the trigger users click in the
titleslot.Place the command list
Build
sy-menuand its items in the default slot.Run the selected command
Read
valuefrom theselectedevent and perform the corresponding action. Usedisabledto prevent execution.
Examples
#Feature examples
#Choose a feature from 8 topics. Explore property settings, method calls, event results, and slot layouts through live examples and code.
No matching features.
API reference
#Hover over a name or focus it with the keyboard to see the code. On touch screens, tap the name.
<sy-dropdown>
Properties
| Attribute / Property | Type | Default | Description |
|---|---|---|---|
boolean | false | Hide the default border. | |
boolean | false | Block user interaction and keyboard focus. | |
'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'bottomLeft' | Corner used to align the menu with its trigger. | |
'small' | 'medium' | 'large' | 'medium' | Component size. | |
'hover' | 'click' | 'click' | User action that opens the list or popup. | |
string | '' | Helper description for the trigger. |
Events
| Event | Detail | Description |
|---|---|---|
CustomEvent<any> | Emitted when the user selects an item. |
Slots
| Slot | Description |
|---|---|
| Content displayed in the title area. | |
| Component body or child items. |