PhoenixKitWeb.Components.UserDashboardNav (phoenix_kit v1.7.164)

Copy Markdown View Source

User dashboard navigation components for the PhoenixKit user dashboard. Provides navigation elements specifically for user dashboard pages.

Summary

Functions

Renders the user widget for dashboard navigation.

Functions

user_dropdown(assigns)

Renders the user widget for dashboard navigation.

For authenticated visitors this is the avatar dropdown (email, Admin/Dashboard/Settings, language switcher, log out). For anonymous visitors the same dropdown shape is rendered with a generic "not signed in" icon and guest-relevant links (log in, sign up, forgot password, magic link) plus the same language switcher — so a single widget covers both states and always offers a language switcher.

Attributes

  • :scope — current scope; nil/unauthenticated renders the guest dropdown.
  • :current_path — used for active-link highlighting and locale-switch URLs.
  • :current_locale — base code of the active locale (highlighted in the list).
  • :show_language_switcher — include the in-menu language list (default true). Set false when the host renders a standalone switcher elsewhere to avoid a duplicate. Applies to both the signed-in and guest states.
  • :guest_links — which guest links may appear, e.g. [:login, :register, :reset, :magic_link] (default: all). Links are also gated by the allow_registration / magic_link_login_enabled settings, so this list can only narrow, never force-enable a disabled feature.

Attributes

  • scope (:any) - Defaults to nil.
  • current_path (:string) - Defaults to "".
  • current_locale (:string) - Defaults to "en".
  • admin_edit_url (:string) - Defaults to nil.
  • admin_edit_label (:string) - Defaults to nil.
  • show_language_switcher (:boolean) - Defaults to true.
  • guest_links (:list) - Defaults to [:login, :register, :reset, :magic_link].