Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

PageHeader

Since 0.1.0-alpha.24
Shows a page's title, its status, what it's for, and its actions.

The top of a page: its title (with a status badge beside it, if set), a muted line on what it's for, and actions at the end, which wrap under the text on narrow screens. The title is the page's h1 unless set. A main action can float at the screen's corner on a phone (Button FloatBelow in PageHeaderActions). A record's page can show its avatar or icon before the title (PageHeaderMedia).

Title, description and actions

A page header names the page and says what it's for. Set Title and Description. For the page's main actions or its status, add PageHeaderActions; they sit at the end and wrap under the text on a phone.

Static

Preview

Invoices

Everything you've billed, newest first.

Code

Usage.razor
<PageHeader Title="Invoices" TitleLevel="2" Description="Everything you've billed, newest first." Grow>
    <PageHeaderActions>
        <Button Variant="ButtonVariant.Outline" Accent="Accent.Neutral" StartIcon="Lucide.Download">Export</Button>
        <Button StartIcon="Lucide.Plus">New invoice</Button>
    </PageHeaderActions>
</PageHeader>

Add this example to a page with the izzy CLI:

bash
izzy add component PageHeader --at <file>:<line>

A status beside the title

For a record's page, such as one invoice, set Badge to where it stands and BadgeStatus to its color. The badge sits beside the title and wraps under a long one.

Static

Preview

INV-0042

Overdue

Maya Chen · Was due Oct 31, 2026 · $976.50

Code

StatusBadge.razor
@* One invoice's page: its number, where it stands, and the next step. *@
<PageHeader Title="INV-0042" TitleLevel="2" Badge="Overdue" BadgeStatus="Status.Danger" Description="Maya Chen · Was due Oct 31, 2026 · $976.50" Grow>
    <PageHeaderActions>
        <Button Variant="ButtonVariant.Outline" Accent="Accent.Neutral" StartIcon="Lucide.Download">Download PDF</Button>
        <Button StartIcon="Lucide.Check">Mark as paid</Button>
    </PageHeaderActions>
</PageHeader>

An avatar before the title

For a person's or a company's page, put an Avatar in PageHeaderMedia. It sits before the title, centered on the text, on a phone too.

Static

Preview

Olivia Chen

Acme Co. · Customer

Code

Media.razor
@* One contact's page: who they are, where they work, and what to do next. *@
<PageHeader Title="Olivia Chen" TitleLevel="2" Description="Acme Co. · Customer" Grow>
    <PageHeaderMedia>
        <Avatar Name="Olivia Chen" Size="AvatarSize.Lg" Decorative />
    </PageHeaderMedia>
    <PageHeaderActions>
        <Button Variant="ButtonVariant.Outline" Accent="Accent.Neutral">Log activity</Button>
        <Button StartIcon="Lucide.Plus">New deal</Button>
    </PageHeaderActions>
</PageHeader>

Actions that float on a phone

A page's main actions can leave the header on a phone and float in the screen's bottom corner, where the thumb reaches them. Set FloatBelow on each Button, which needs a StartIcon. One floats as a button; several share a speed dial, named by the actions' FloatLabel.

Preview

Code

Float.razor
@inject NavigationManager Navigation

@* A contact's page. On a phone its two actions leave the header and share a speed dial at the
   screen's corner, named by the actions' FloatLabel. Each is a link that stays on this page. *@
<Stack Gap="4" Padding="4">
    <PageHeader Title="Olivia Chen" Description="Acme Co. · Customer">
        <PageHeaderMedia>
            <Avatar Name="Olivia Chen" Size="AvatarSize.Lg" Decorative />
        </PageHeaderMedia>
        <PageHeaderActions FloatLabel="Add">
            <Button Href="@To("activity")" Variant="ButtonVariant.Outline" Accent="Accent.Neutral" StartIcon="Lucide.CalendarPlus"
                    FloatBelow="Breakpoint.Sm">Log activity</Button>
            <Button Href="@To("deal")" StartIcon="Lucide.Plus" FloatBelow="Breakpoint.Sm">New deal</Button>
        </PageHeaderActions>
    </PageHeader>
    @if (Added is not null)
    {
        <Alert Status="Status.Info">New @Added.</Alert>
    }
    <Stack Gap="2">
        @foreach (var note in Notes)
        {
            <Card Padding="3">@note</Card>
        }
    </Stack>
</Stack>

@code {
    [SupplyParameterFromQuery(Name = "add")] private string? Added { get; set; }

    private string To(string what) => Navigation.GetUriWithQueryParameter("add", what);

}

Sizes

Size sets the title's size: Sm for a section inside a page, Md (the default) for most pages, Lg for a page with little else on it, such as a sign-in form. For a header under the page's own h1, set TitleLevel.

Static

Preview

Welcome back

Sign in to pick up where you left off.

Team members

People who can see and edit this workspace.

Pending invitations

Invitations expire after seven days.

3 pending

Code

Sizes.razor
<Column Gap="8" Grow>
    <PageHeader Title="Welcome back" TitleLevel="2" Size="ControlSize.Lg"
                Description="Sign in to pick up where you left off." />
    <PageHeader Title="Team members" TitleLevel="2"
                Description="People who can see and edit this workspace." />
    <PageHeader Title="Pending invitations" TitleLevel="3" Size="ControlSize.Sm"
                Description="Invitations expire after seven days.">
        <PageHeaderActions>
            <Badge Status="Status.Warning">3 pending</Badge>
        </PageHeaderActions>
    </PageHeader>
</Column>

Centered

A page that is one narrow column, such as a sign-in form, reads best with its header on the middle line. Set Centered. A logo or avatar in PageHeaderMedia moves above the title, and any actions go below the text.

Static

Preview

Welcome back

Sign in to your Northstar Studio workspace.

Code

Centered.razor
@* A sign-in page's header: the app's mark, then the title and what to do, on the middle line. *@
<PageHeader Title="Welcome back" TitleLevel="2" Size="ControlSize.Lg" Description="Sign in to your Northstar Studio workspace." Centered Grow>
    <PageHeaderMedia>
        <Icon Name="Lucide.Handshake" Size="IconSize.Xl" Color="Color.Primary" />
    </PageHeaderMedia>
</PageHeader>

Parts

Written inside PageHeader. The API page lists their parameters.

  • PageHeaderMedia: a picture before a PageHeader's title on a record's page, such as a contact's Avatar or a company's logo.
  • PageHeaderActions: buttons, links or a status at the end of a PageHeader, such as "New invoice" or a badge.

Mode support

What works in each mode, PageHeader
FeatureStaticInteractive
EverythingYesYes

Static: static server-side rendering, with no circuit and no WebAssembly. Interactive: Server, WebAssembly or Auto.

Accessibility

  • Title is a heading, an h1 by default; set TitleLevel when the page has its own h1.
  • The actions follow the title in reading order, so they come after it for keyboard and screen reader users too.

Parameters

PageHeader parameters
PropTypeDefault
TitleThe page's title, such as "Invoices".stringRequired
TitleLevelThe heading level of Title, 1 to 6.int1
BadgeA status beside the title, as a badge with a dot: an invoice's "Overdue", an order's "Shipped".string?
BadgeStatusThe badge's color, such as Status.Danger.StatusStatus.Neutral
DescriptionA muted line under the title: what the page is for, in a sentence.string?
ChildContentAnything else under the description, such as a status line, and any PageHeaderMedia or PageHeaderActions.RenderFragment?
SizeThe title and description size: ControlSize.Sm (a 20px title, 14px description) for a section inside a page, ControlSize.Md (24px and 16px, the default) for most pages, ControlSize.Lg (30px and 16px) for a page with little else on it, such as a sign-in form.ControlSizeControlSize.Md
CenteredCenters the title and description, with any PageHeaderMedia above them and any PageHeaderActions below: for a page that is one narrow column, such as a sign-in form.boolfalse

See also

  • Heading: renders headings 1 to 6, with fluid sizes and section links.
  • Container: centers content at a readable width.
  • Card: groups media, a header, body sections, actions and a footer in a box.
  • Breadcrumb: shows where a page sits in the site, with a link back up to each level.

Connection lost

Rejoining the server…