View Source Phoenix.WebComponent.LeftMenu (Phoenix.WebComponent v3.2.4)

Render left menu.

Link to this section Summary

Functions

Generates left menu

Generates left menu Group

Link to this section Functions

Generates left menu

example

Example

<.wc_left_menu
  class="w-[200px] bg-[rgba(255,255,255,.7)] text-[14px]"
  active="actionbar"
>
  <:title class="text-[#A1A7C4]">Phx WebComponents</:title>
  <:menu>actionbar</:menu>
  <:menu>appbar</:menu>
</.wc_left_menu>

attributes

Attributes

  • id (:any) - html attribute id. Defaults to false.
  • class (:any) - html attribute class. Defaults to "".
  • active (:string) - actvie menu id. Defaults to "".

slots

Slots

  • title - Render menu title. Accepts attributes:
    • class (:string)
  • menu - Render menu.
Link to this function

wc_left_menu_group(assigns)

View Source

Generates left menu Group

example

Example

<.wc_left_menu_group active={"mdi"}>
  <:title>Icons</:title>
  <:menu id="mdi" to={~p"/icons/mdi"}>MD Icon</:menu>
  <:menu id="bsi" to={~p"/icons/bsi"}>BS Icon</:menu>
</.wc_left_menu_group>

attributes

Attributes

  • id (:any) - html attribute id. Defaults to false.
  • class (:any) - html attribute class. Defaults to "".
  • active (:string) - actvie menu id. Defaults to "".

slots

Slots

  • title (required) - Render menu title. Accepts attributes:
    • class (:string)
  • menu - Render menu. Accepts attributes:
    • id (:string)
    • class (:string)
    • to (:string)