Elemental.Actions.Dropdown (elemental v0.3.2)
A dropdown can open a menu, or anything really, once open.
Useful for building menus, dropdown selects and more. For a complete example
of it's usage you can check out Elemental.DataInput.Select.
Usage
<.dropdown>
<:trigger>Open the dropdown</:trigger>
The content to show when dropdown is open
</.dropdown>Implementation details
Currently this is implemented using <details>/<summary> HTML elements
to ensure maximum compatibility with browsers and minimal overhead.
This limits the possible content in trigger to only things allowed inside
the <summary> HTML element for it to behave correctly.
Summary
Functions
The primary dropdown component.
Functions
The primary dropdown component.
Attributes
align(:string) - Specify the alignment for the dropdown. Defaults to"start".from(:string) - Specify where the dropdown will appear from. Defaults to"bottom".hover(:boolean) - To enable opening the dropdown on hover. Defaults tofalse.open(:boolean) - To open the dropdown immediately. Defaults tofalse.
Slots
trigger(required) - The trigger used to open the dropdown. Accepts attributes:class(:any) - Additional classes to pass to the trigger.
inner_block(required) - The content dropdown to show once open.