Page header

A breadcrumb, a title and the page's actions.

Updated

Default

Annual report

Last edited by Ada Lovelace yesterday.



<div class="flex flex-col gap-4">
	{ui breadcrumb,
		items: [
			['title' => 'Home', 'href' => '/'],
			['title' => 'Projects', 'href' => '#'],
			['title' => 'Annual report'],
		],
	/}
	<div class="flex flex-wrap items-center justify-between gap-4">
		<div>
			<h2 class="text-2xl font-semibold">Annual report</h2>
			<p class="text-muted">Last edited by Ada Lovelace yesterday.</p>
		</div>
		<div class="flex gap-2">
			{ui button, title: 'Export', class: 'button-outline', icon: 'download' /}
			{ui button, title: 'Publish' /}
		</div>
	</div>
	{ui separator /}
</div>

The title and its description sit on the left, the actions on the right, and flex-wrap drops the actions below the title on a narrow screen. The primary action is the one filled button; the rest are button-outline. A separator closes the header off from the content.