View Source Phoenix.WebComponent.Appbar (Phoenix.WebComponent v2.5.1)

render appbar

Link to this section Summary

Functions

Generates a html customElement appbar.

Generates an simple html appbar.

Link to this section Functions

Generates a html customElement appbar.

example

Example

<.wc_appbar
  title={"Phoenix WebComponent"}
  menus={[
    %{ label: "Component Storybook", to: Routes.live_storybook_path(@conn, :root) }
  ]}
>
  <:logo>
    <logo-gsmlg-dev />
  </:logo>
  <:user_profile>
    (^_^)
  </:user_profile>
</.wc_appbar>

attributes

Attributes

  • id (:string) - html attribute id. Defaults to "".

  • class (:string) - html attribute class. Defaults to "".

  • title (:string) - Appbar title. Defaults to "".

  • menus (:list) - Appbar menus

    example: [ %{ label: "Menu Name", to: ~p"/menu-url" } ]

    Defaults to [].

slots

Slots

  • logo - Appbar Logo.
  • user_profile - Appbar right side user_profile.
Link to this function

wc_simple_appbar(assigns)

View Source

Generates an simple html appbar.

example

Example

<.wc_simple_appbar
  title={"Phoenix WebComponent"}
  menus={[
    %{ label: "Component Storybook", to: Routes.live_storybook_path(@conn, :root) }
  ]}
>
  <:logo>
    <logo-gsmlg-dev />
  </:logo>
  <:user_profile>
    (^_^)
  </:user_profile>
</.wc_simple_appbar>

attributes

Attributes

  • id (:string) - html attribute id. Defaults to "".

  • class (:string) - html attribute class. Defaults to "".

  • title (:string) - Appbar title. Defaults to "".

  • menus (:list) - Appbar menus

    example: [ %{ label: "Menu Name", to: ~p"/menu-url" } ]

    Defaults to [].

slots

Slots

  • logo - Appbar Logo.
  • user_profile - Appbar right side user_profile.