KANTO DS v1.12.0
Customise

Theme

Accent

Font

Corners

Density

Text size

Reset to Kanto
Navigation

kt-page-header

GitHub Copy link

The block every screen opens with: an overline, a title, a sentence, and the actions that belong to the page rather than to anything on it.

Preview

Upload a file New document See all files

The block every screen opens with: an overline, a title, a sentence, and the actions that belong to the page rather than to anything on it.

<kt-page-header eyebrow="Dashboard" heading="Good evening" description="An overview of your workspace: recent files, integrations and activity." > <kt-button slot="actions" variant="dark" icon="upload">Upload a file</kt-button> <kt-button slot="actions" icon="plus">New document</kt-button> </kt-page-header>

It exists because it was being rebuilt on every screen, and the copies drifted: different heading levels, different gaps, actions sometimes above the title and sometimes beside it. None of those are decisions worth making twice.

Two levels

level="page" (the default) renders an <h1> at display scale — one per screen. level="section" renders an <h2> at body scale, for a region inside a page, where the trailing action is usually a link onward rather than a button:

<kt-page-header level="section" heading="Recently opened"> <a slot="actions" href="#/files">See all files</a> </kt-page-header>

Both wrap on a narrow screen: the actions drop under the copy rather than squeezing the title.

API

PropertyAttributeTypeDefault
eyebroweyebrowstring''
headingheadingstring''
descriptiondescriptionstring''
levellevel'page' | 'section''page'
SlotDescription
defaultExtra content under the description
actionsButtons or a link, trailing on wide screens
PartDescription
baseThe container
headingThe heading element