Noora.TabMenu (noora v0.11.0)

Tab menu components.

Example

<.tab_menu_horizontal>
  <.tab_menu_horizontal_item
    label="Overview"
    patch={~p"/products/#{@product}/overview"}
    selected={@tab == :overview}
  />
  <.tab_menu_horizontal_item
    label="Analytics"
    patch={~p"/products/#{@product}/analytics"}
    selected={@tab == :analytics}
  >
    <:icon_left>
      <.chart_icon />
    </:icon_left>
  </.tab_menu_horizontal_item>
  <.tab_menu_horizontal_item
    label="Settings"
    patch={~p"/products/#{@product}/settings"}
    selected={@tab == :settings}
  />
</.tab_menu_horizontal>

Summary

Functions

tab_menu_horizontal(assigns)

Attributes

  • Global attributes are accepted.

Slots

  • inner_block (required)

tab_menu_horizontal_item(assigns)

Attributes

  • label (:string) (required) - The label of the menu item.
  • selected (:boolean) - Whether the item is selected. Defaults to false.
  • navigate (:string) - Navigate to a different LiveView. Defaults to nil.
  • patch (:string) - Patches the current LiveView. Defaults to nil.
  • replace (:boolean) - Whether to replace the current item in the history. Defaults to true.
  • Global attributes are accepted.

Slots

  • icon_left - Icon displayed on the left of an item.
  • icon_right - Icon displayed on the right of an item.

tab_menu_vertical(assigns)

Attributes

  • label (:string) (required) - The label of the menu item.
  • Global attributes are accepted.

Slots

  • icon_left - Icon displayed on the left of an item.
  • icon_right - Icon displayed on the right of an item.