View Source PetalComponents.Dropdown (petal_components v1.2.14)
Summary
Functions
<.dropdown label="Dropdown" js_lib="alpine_js|live_view_js">
Attributes
to
(:string
) - link path. Defaults tonil
.label
(:string
) - link label.class
(:string
) - any additional CSS classes. Defaults to""
.link_type
(:string
) - Defaults to"button"
.- Global attributes are accepted.
Slots
inner_block
Functions
<.dropdown label="Dropdown" js_lib="alpine_js|live_view_js">
<.dropdown_menu_item link_type="button">
<Heroicons.home class="w-5 h-5 text-gray-500" />
Button item with icon
</.dropdown_menu_item>
<.dropdown_menu_item link_type="a" to="/" label="a item" />
<.dropdown_menu_item link_type="live_patch" to="/" label="Live Patch item" />
<.dropdown_menu_item link_type="live_redirect" to="/" label="Live Redirect item" />
</.dropdown>
Attributes
options_container_id
(:string
)label
(:string
) - labels your dropdown option. Defaults tonil
.class
(:string
) - any extra CSS class for the parent container. Defaults to""
.menu_items_wrapper_class
(:string
) - any extra CSS class for menu item wrapper container. Defaults to""
.js_lib
(:string
) - javascript library used for toggling. Defaults to"alpine_js"
.placement
(:string
) - Defaults to"left"
.- Global attributes are accepted.
Slots
trigger_element
inner_block