Page header
The top of a page, three ways: a list, one record, and a settings page. Each is a page header as an app would write it, in the sidebar shell, with the page under it.


A block, not a component: copy the views below into your app. They are pages in the sidebar shell, which assumes the base layout; in the top-nav shell they read the same, less the breadcrumb in the top row.
What it shows
-
(a) A list page, My issues: the title, a line on what is in the list, the one primary action (New issue), and the secondary ones (Export CSV, Import, Saved views) passed as data in
secondary, so that withcollapseActionsthey fold into a More menu when the header is narrower than 36rem, as on the phone above. Only actions passed assecondaryfold; theactionsslot always shows, so the primary action stays a button. -
(b) A detail page, one issue:


- the way back to its project (
backHref) above the title, and its place in the app as a breadcrumb in the shell's top row (from md up; on a phone the back link alone does the job); - the title, as long as an issue's title is, wrapping;
- its status as a badge with a dot and the people on it as an
avatar group, in the
metaslot, and its key, author and date in thedescriptionslot; - Edit, Move to project and Delete as
secondary, Delete with'tone' => 'danger', folding into More on a phone; and Close issue as the primary action, a form that posts, so it needs no script; - its sections (Details, Activity, Linked issues, with counts) as
navigation tabs in the
tabsslot, on the header's bottom edge.
- the way back to its project (
-
(c) A settings page: a title and one line on what the page changes, and nothing else in the header. The form under it holds its own Save, so the header has no actions:

A sticky header?
stickykeeps the header at the top of the scroll area, on the app's ground, for a long settings page whose title should stay in sight. It sticks at the very top (top-0), though, and both shells have a sticky bar of their own there, which would cover it, so it is left off here. Use it in a frame whose bar scrolls away, or inside a scrolling pane of its own (a split pane, a drawer), where the header is the first thing at the top.
Built from
- Page header: all three, with
secondary,collapseActions,backHref, and themeta,description,actionsandtabsslots - Button: New issue, Close issue, Save changes, and the secondary actions (drawn by the header)
- Badge: the issue's status and each row's
- Avatar group: the people on the issue
- Breadcrumb: Projects, Harbour app, HBR-142 in the top row
- Tabs: the issue's sections
- Panel: the list, the description, the form's card
- Input: the settings form, its select included
The markup
resources/views/issues/index.blade.php
{{--
(a) A list page: title, description, the one primary action, and the
secondary ones as data so they fold into a More menu when the header is
narrow. The controller passes $issues.
--}}
@php
$secondary = [
['label' => 'Export CSV', 'href' => route('issues.export'), 'icon' => 'arrow-down-tray'],
['label' => 'Import', 'href' => route('issues.import'), 'icon' => 'arrow-up-tray'],
['label' => 'Saved views', 'href' => route('views.index'), 'icon' => 'bookmark'],
];
@endphp
<x-layouts.app title="My issues">
<div class="flex flex-col gap-6">
<x-ds::page-header
title="My issues"
description="Assigned to you in every project, the most urgent first."
:secondary="$secondary"
:collapseActions="true"
>
<x-slot:actions>
<x-ds::button icon="plus" :href="route('issues.create')">New issue</x-ds::button>
</x-slot:actions>
</x-ds::page-header>
<x-ds::panel>
@foreach ($issues as $issue)
<x-ds::panel-row :href="route('issues.show', $issue['key'])">
<span class="flex min-w-0 items-center gap-3">
<span class="w-16 shrink-0 text-meta tabular-nums text-fg-muted">{{ $issue['key'] }}</span>
<span class="min-w-0 flex-1 truncate text-fg">{{ $issue['title'] }}</span>
<x-ds::badge :tone="$issue['tone']">{{ $issue['status'] }}</x-ds::badge>
</span>
</x-ds::panel-row>
@endforeach
</x-ds::panel>
</div>
</x-layouts.app>
resources/views/issues/show.blade.php
{{--
(b) A detail page: the way back, the issue's place in the app (in the
shell's top row), its title with its status and the people on it, its
actions, and its sections as tabs on the header's bottom edge. The
controller passes $issue.
--}}
@php
$secondary = [
['label' => 'Edit', 'href' => route('issues.edit', $issue['key']), 'icon' => 'pencil-square'],
['label' => 'Move to project', 'href' => route('issues.move', $issue['key']), 'icon' => 'arrow-right-circle'],
['label' => 'Delete', 'href' => route('issues.delete', $issue['key']), 'icon' => 'trash', 'tone' => 'danger'],
];
@endphp
<x-layouts.app :title="$issue['key'].': '.$issue['title']">
<x-slot:breadcrumb>
<x-ds::breadcrumb>
<x-ds::breadcrumb-item :href="route('projects.index')">Projects</x-ds::breadcrumb-item>
<x-ds::breadcrumb-item :href="route('projects.show', $issue['project']['key'])">{{ $issue['project']['name'] }}</x-ds::breadcrumb-item>
<x-ds::breadcrumb-item :current="true">{{ $issue['key'] }}</x-ds::breadcrumb-item>
</x-ds::breadcrumb>
</x-slot:breadcrumb>
<div class="flex flex-col gap-6">
<x-ds::page-header
:title="$issue['title']"
:backHref="route('projects.show', $issue['project']['key'])"
:backLabel="$issue['project']['name']"
:secondary="$secondary"
:collapseActions="true"
>
<x-slot:meta>
<x-ds::badge :tone="$issue['tone']" :dot="true">{{ $issue['status'] }}</x-ds::badge>
<x-ds::avatar-group label="Assignees" :avatars="$issue['assignees']" size="xs" />
</x-slot:meta>
<x-slot:description>
{{ $issue['key'] }} · opened by {{ $issue['author'] }} on {{ $issue['opened'] }}
</x-slot:description>
<x-slot:actions>
<form method="POST" action="{{ route('issues.close', $issue['key']) }}">
@csrf
<x-ds::button type="submit" icon="check-circle">Close issue</x-ds::button>
</form>
</x-slot:actions>
<x-slot:tabs>
<x-ds::tabs label="Issue sections" :navigation="true">
<x-ds::tab :href="route('issues.show', $issue['key'])" :active="true">Details</x-ds::tab>
<x-ds::tab :href="route('issues.activity', $issue['key'])" :count="$issue['comments']">Activity</x-ds::tab>
<x-ds::tab :href="route('issues.links', $issue['key'])" :count="$issue['links']">Linked issues</x-ds::tab>
</x-ds::tabs>
</x-slot:tabs>
</x-ds::page-header>
<x-ds::panel title="Description" body="plain">
<div class="flex max-w-prose flex-col gap-3 text-body text-fg-body">
@foreach ($issue['description'] as $paragraph)
<p>{{ $paragraph }}</p>
@endforeach
</div>
</x-ds::panel>
</div>
</x-layouts.app>
resources/views/settings/workspace.blade.php
{{--
(c) A settings page: a title and a line on what the page changes, and
nothing else in the header; the form holds the actions. The controller
passes $workspace.
--}}
<x-layouts.app title="Workspace settings">
<div class="flex flex-col gap-6">
<x-ds::page-header
title="Workspace settings"
description="The name, address and time zone everyone in your workspace sees."
/>
<x-ds::panel body="plain">
<form method="POST" action="{{ route('settings.workspace.update') }}" class="flex max-w-xl flex-col gap-5">
@csrf
@method('PUT')
<x-ds::input id="name" name="name" label="Workspace name" required :value="old('name', $workspace['name'])" :error="$errors->first('name')" />
<x-ds::input id="slug" name="slug" label="Address" :help="'pebblework.example/'.$workspace['slug']" required :value="old('slug', $workspace['slug'])" :error="$errors->first('slug')" />
<x-ds::input as="select" id="timezone" name="timezone" label="Time zone" help="Due dates and cycle ends follow it." :error="$errors->first('timezone')">
@foreach (['Europe/London' => 'London (GMT)', 'Europe/Lisbon' => 'Lisbon (WET)', 'Atlantic/Reykjavik' => 'Reykjavík (GMT)', 'Europe/Oslo' => 'Oslo (CET)'] as $zone => $name)
<option value="{{ $zone }}" @selected(old('timezone', $workspace['timezone']) === $zone)>{{ $name }}</option>
@endforeach
</x-ds::input>
<div>
<x-ds::button type="submit">Save changes</x-ds::button>
</div>
</form>
</x-ds::panel>
</div>
</x-layouts.app>
Wire it up
The pages take what their controllers pass: $issues for the list,
$issue for the detail page and $workspace for settings, shaped as the
views read them (arrays here, so the views show every field they use;
Eloquent models read the same with ->). The routes beyond the
sidebar shell's are
issues.export, issues.import, views.index, issues.edit,
issues.move, issues.delete, issues.activity and issues.links
(GET), issues.close (POST) and settings.workspace.update (PUT).
Secondary actions that do something
A secondary entry is a link (href) or a button: give it attributes
for what the button does. From Livewire:
['label' => 'Delete', 'icon' => 'trash', 'tone' => 'danger', 'attributes' => ['wire:click' => 'delete', 'wire:confirm' => 'Delete HBR-142?']],
Here Delete is a link to a confirmation page, so it works without a script and asks before it deletes.
The breadcrumb in the top row
The detail page fills the shell's breadcrumb slot; the list and settings
pages leave it empty, as top-level pages, so the row shows only the
toggle and the tools. Keep the last item current and the trail short:
the row hides it below md, where backHref takes over.
Phone, keyboard, no script
- Phone: the header stacks (title, then meta and description, then the actions), and the secondary actions fold into More by the header's own width, so a header in a narrow pane folds on a desktop too.
- Keyboard: More is a dropdown: arrow keys move through it and Escape returns to its button. The tabs are links, one Tab stop each.
- No script: without
collapseActionsthe secondary actions are buttons and need nothing; with it, More needs Alpine. Close issue and the settings form post as forms; the tabs and the back link are links.
From the package repo: edit this page on GitHub.