Ga naar hoofdinhoud

CnPageHeader

Page header with an optional MDI icon, title, and description. Used at the top of index and detail pages to provide consistent visual identity.

Wraps: CnIcon

Try it

Loading CnPageHeader playground…

Usage

<!-- Basic with icon -->
<CnPageHeader
title="Clients"
description="Manage your client relationships"
icon="AccountGroup" />

<!-- Title only -->
<CnPageHeader title="Settings" />

<!-- Custom icon via slot -->
<CnPageHeader title="Dashboard">
<template #icon>
<img src="/apps/myapp/img/logo.svg" alt="" class="page-icon" />
</template>
</CnPageHeader>

<!-- Extra content alongside title -->
<CnPageHeader title="Cases" description="Open cases" icon="BriefcaseOutline">
<CnStatusBadge :label="String(openCount)" variant="warning" />
</CnPageHeader>

Props

PropTypeRequiredDefaultDescription
titleStringPage title text
descriptionString''Optional description shown below the title
iconString''MDI icon name rendered via CnIcon
iconSizeNumber28Icon size in pixels

Slots

SlotDescription
iconCustom icon element replacing the icon prop
extraAdditional content rendered after the title block (e.g., badges, counters)

Reference (auto-generated)

The tables below are generated from the SFC source via vue-docgen-cli. They reflect what's actually in CnPageHeader.vue and update automatically whenever the component changes.

Props

NameTypeRequiredDefaultDescription
titlestringPage title text
descriptionstring''Optional description shown below the title
iconstring''Optional MDI icon name (rendered via CnIcon)
iconSizenumber28Icon size in pixels

Slots

NameBindingsDescription
icon
extra