Page header
Summary
A structured title block for detail pages: an optional
image/avatar at the start, the title (with optional status badge)
and a muted description in the middle, and page-level actions
flush at the inline end. For simple pages, the plain
.soma-page-title (optionally with an inline
.soma-page-subtitle) is all you need. Either way,
the title is the page's single <h1>.
When to use
| Form | Use it for |
|---|---|
.soma-page-header | Detail pages about one entity (a project, service, user) where identity, description and actions belong together. |
h1.soma-page-title alone | Listings, dashboards, settings — a heading is enough. |
Inline .soma-page-subtitle | A short muted qualifier after the title ("Dashboard — statistics and more"). |
| Badge in the title | The entity's status at a glance: LIVE, archived, degraded (see Badges). |
.soma-page-header-actions | Actions on the page's subject itself. Actions scoped to a content region belong in a toolbar instead. |
-image shape | Person page → default circle avatar; entity page (project, app, service) → .soma-avatar-square (see Avatars). |
| Breadcrumbs | Place .soma-breadcrumbs above the title inside -main. The header is their documented home on detail pages. |
| Actions slot contents | Any inline-end control: buttons, a dropdown trigger, or a compact progress readout; not just buttons. |
Examples
In an app the title is the page's <h1>;
these demos use <h2> only because this docs
page already has one.
HTML
<!-- Heading level: use the page's real outline level (h1 on a page) -->
<div class="soma-page-header">
<div class="soma-page-header-image">
<span class="soma-avatar soma-avatar-xlarge soma-avatar-square soma-avatar-initials">PX</span>
</div>
<div class="soma-page-header-main">
<h1 class="soma-page-title">Project X</h1>
<p>Production workloads for the US East region.</p>
</div>
<div class="soma-page-header-actions">
<button class="soma-button">Edit</button>
<button class="soma-button soma-button-danger">Delete</button>
</div>
</div>
<!-- plain form -->
<h1 class="soma-page-title">Dashboard
<span class="soma-page-subtitle">statistics and more</span></h1>
CSS classes
| Class | Effect |
|---|---|
.soma-page-header | The flex block; zeroes the nested title's margins and mutes its description <p>. |
.soma-page-header-image | Fixed slot at the start: an avatar or logo. |
.soma-page-header-main | Flexible middle: the title plus an optional description paragraph. |
.soma-page-header-actions | Buttons flush at the inline end, optically aligned with the title. |
.soma-page-title | The page's <h1> — display size, regular weight. |
.soma-page-subtitle | Muted inline qualifier inside the title. |
JavaScript
None. The page header is pure CSS.