PhiaUi.Components.Layout.PageHeader (phia_ui v0.1.17)

Copy Markdown View Source

Page title bar with breadcrumb, title, description, and actions slots.

Renders a structured page header with semantic hierarchy. Slot usage is flexible — use only the slots you need.

Examples

<%!-- Minimal title + actions --%>
<.page_header>
  <:title>Dashboard</:title>
  <:actions>
    <.button>Export</.button>
    <.button variant={:default}>New project</.button>
  </:actions>
</.page_header>

<%!-- With breadcrumb and description --%>
<.page_header border>
  <:breadcrumb>
    <.breadcrumb>
      <.breadcrumb_item href="/projects">Projects</.breadcrumb_item>
      <.breadcrumb_separator />
      <.breadcrumb_item>Settings</.breadcrumb_item>
    </.breadcrumb>
  </:breadcrumb>
  <:title>Project Settings</:title>
  <:description>Manage this project's configuration.</:description>
</.page_header>

Summary

Functions

Renders a page header with structured slots.

Functions

page_header(assigns)

Renders a page header with structured slots.

Attributes

  • border (:boolean) - Adds border-b border-border below the header. Defaults to false.
  • class (:string) - Additional CSS classes merged via cn/1. Defaults to nil.
  • Global attributes are accepted. HTML attributes forwarded to the root element.

Slots

  • breadcrumb - Optional breadcrumb navigation above the title.
  • title - Main page title (rendered as h1).
  • description - Optional subtitle or description.
  • actions - Optional right-side action buttons.