Layouts
Header
A top bar with navigation and actions.
A header holds a brand, a navbar, a flux:spacer and then the actions. sticky pins it; container caps its contents at the same width as the main column.
main
<flux:header sticky container class="border-b border-zinc-200 dark:border-zinc-700">
<flux:brand href="/" name="Majid DS" />
<flux:navbar class="max-lg:hidden">
<flux:navbar.item href="#" current>Home</flux:navbar.item>
<flux:navbar.item href="#">Flash deals</flux:navbar.item>
</flux:navbar>
<flux:spacer />
<flux:button icon="shopping-cart" square variant="subtle" aria-label="Cart" />
<flux:profile avatar="/me.jpg" name="Sara Rezaei" />
</flux:header>
Reference
flux:header
| Prop | Description |
|---|---|
| sticky | Pins the header to the top of the viewport. |
| container | Caps the contents at max-w-7xl and centres them. |