PhoenixKitProjects.Web.Components.PageHeader (PhoenixKitProjects v0.2.2)

Copy Markdown View Source

Section heading + description + action button row used by every admin LV in the projects module (Overview, Projects list, Tasks, Templates, Project show, every form).

Slots

  • :actions — the action buttons rendered on the right side. Multiple action slots stack horizontally with gap-2.
  • :back_link — optional link rendered above the heading (the form-page "← back to list" pattern). When present the heading drops the description (forms typically don't have one).

Examples

# List-page header.
<.page_header title="Projects" description="All projects.">
  <:actions>
    <.link navigate={Paths.new_project()} class="btn btn-primary btn-sm">
      New project
    </.link>
  </:actions>
</.page_header>

# Form-page header (back-link variant).
<.page_header title={@page_title}>
  <:back_link>
    <.link navigate={Paths.projects()} class="link link-hover text-sm">
      <.icon name="hero-arrow-left" class="w-4 h-4 inline" /> {gettext("Projects")}
    </.link>
  </:back_link>
</.page_header>

Summary

Functions

page_header(assigns)

Attributes

  • title (:string) (required)
  • description (:string) - Defaults to nil.

Slots

  • actions
  • back_link