PageHeader
PageHeader titles a page or section, with optional metadata, status, description and actions. Compact, standard and detail headers are compositions of the same parts, not variants.
- The title renders an
h1. UseasChildto pick another heading level. - For a larger title, add
className="nx:typography-heading-large"to PageHeaderTitle. - Put page headers inside
mainand section headers inside theirsection. - Actions wrap below the content in narrow containers. Your app owns what they do.
Activity report
Review activity for the selected period.
This example also needs: Button.
Installation
Run npx nxds-cli@latest init first if nxds isn’t set up in your app yet. See Install.
Usage
Composition
Examples
Section header
Title a section inside a page with an h2 through asChild.
Notification settings
Choose which updates you receive.
Compact
Pair a title with one small action for a dense page.
Reports
Detail
Show a record with metadata, a status Badge in PageHeaderTitleRow and actions.
PO-0001 · Project 254
Purchase order
SentOffice furniture for the Riverside workspace.
- Supplier
- Riverside Furniture
- Delivery date
This example also needs: Badge, DescriptionList.
With tabs
Place Tabs under the header to switch between views of the page.
Usage
Monitor activity and spending across your workspace.
Activity for the current billing period.
This example also needs: Tabs.
Large heading
Add nx:typography-heading-large to the title for a larger heading.
Workspace overview
Track usage, members, and billing across your workspace.
Props
PageHeader
PageHeader adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderActions
PageHeaderActions adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderContent
PageHeaderContent adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderDescription
PageHeaderDescription adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderMeta
PageHeaderMeta adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderTitle
| Prop | Type | Default | Description |
|---|---|---|---|
asChild | boolean | false | Renders the child element with the title styles. Use it to change the heading level. |
PageHeaderTitleRow
PageHeaderTitleRow adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeader titles a page or section, with optional metadata, status, description and actions. Compact, standard and detail headers are compositions of the same parts, not variants.
- The title renders an
h1. Useas-childto pick another heading level. - For a larger title, add
class="nx:typography-heading-large"to PageHeaderTitle. - Put page headers inside
mainand section headers inside theirsection. - Actions wrap below the content in narrow containers. Your app owns what they do.
This example also needs: Button.
Installation
Install the following dependencies:
Copy and paste the following code into your project.
components/page-header/PageHeader.vue components/page-header/PageHeaderActions.vue components/page-header/PageHeaderContent.vue components/page-header/PageHeaderDescription.vue components/page-header/PageHeaderMeta.vue components/page-header/PageHeaderTitle.vue components/page-header/PageHeaderTitleRow.vue components/page-header/index.ts Keep each file at the path shown above it.
Paths are relative to
packages/vue/src/. Keep the same folders under your@/root, and the imports between files work without edits.
Usage
Examples
Section header
Title a section inside a page with an h2 through as-child.
Compact
Pair a title with one small action for a dense page.
Detail
Show a record with metadata, a status Badge in PageHeaderTitleRow and actions.
This example also needs: Badge, DescriptionList.
With tabs
Place Tabs under the header to switch between views of the page.
This example also needs: Tabs.
Large heading
Add nx:typography-heading-large to the title for a larger heading.
Props
PageHeader
PageHeader adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderActions
PageHeaderActions adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderContent
PageHeaderContent adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderDescription
PageHeaderDescription adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderMeta
PageHeaderMeta adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderTitle
PageHeaderTitle adds no props of its own; it accepts the props of the element or primitive it wraps.
PageHeaderTitleRow
PageHeaderTitleRow adds no props of its own; it accepts the props of the element or primitive it wraps.