Backpex.HTML.CoreComponents (Backpex v0.16.1)
View SourceProvides core components for Backpex.
Summary
Components
Renders a Heroicons icon.
Functions
Renders a dropdown menu component with a trigger and menu content.
Components
Functions
Renders a dropdown menu component with a trigger and menu content.
Examples
<.dropdown id="user-menu">
<:trigger class="btn btn-primary btn-sm">
User Menu
</:trigger>
<:menu>
<li><.link navigate={~p"/profile"} class="menu-item">Profile</.link></li>
<li><.link navigate={~p"/settings"}>Settings</.link></li>
<li><.link navigate={~p"/logout"}>Logout</.link></li>
</:menu>
</.dropdown>Attributes
id(:string) (required) - unique identifier for the dropdown.class(:any) - additional classes for the outer container element. Defaults tonil.- Global attributes are accepted. Supports all globals plus:
["phx-*"].
Slots
trigger- the trigger element to be used to toggle the dropdown menu. Accepts attributes:class(:any) - additional classes for the wrapper of the trigger.
menu- the dropdown menu. Accepts attributes:class(:any) - additional classes for the wrapper of the menu.