SutraUI.Header (Sutra UI v0.2.0)

View Source

A header component for page titles and actions.

Provides a consistent way to display page headers with titles, subtitles, and action buttons across your application.

Examples

<.header>
  Dashboard
</.header>

<.header>
  Settings
  <:subtitle>Manage your account preferences</:subtitle>
</.header>

<.header>
  Users
  <:actions>
    <.button navigate={~p"/users/new"}>New User</.button>
  </:actions>
</.header>

Summary

Functions

Renders a page header with optional subtitle and actions.

Functions

header(assigns)

Renders a page header with optional subtitle and actions.

Slots

  • inner_block (required) - The main title text
  • subtitle - Optional subtitle text displayed below the title
  • actions - Optional action buttons displayed on the right side

Attributes

  • class (:string) - Additional CSS classes. Defaults to nil.
  • Global attributes are accepted. Additional HTML attributes.

Slots

  • inner_block (required) - The main title content.
  • subtitle - Optional subtitle text.
  • actions - Optional action buttons.