API and Development
PageHeader from @prepared911/ui-blocks composes FlexBox and CoreText to show a title, optional Counter, optional ReadOnlyBadge, optional titleAdornment, optional description, optional breadcrumb slot above the title row, and optional trailing actions.
| Name | Type | Default | Description |
|---|---|---|---|
title | string | required | Primary heading. |
titleType | TextType | H3 | Typography token for the title (TextType.H3 maps to the subsection scale). |
titleAdornment | ReactNode | — | Inline content after title, count, and read-only badge. |
description | string | — | Muted supporting copy below the title row. |
breadcrumb | ReactNode | — | Typically Breadcrumb from @prepared911/ui-core. |
count | number | — | Shown as small Counter beside the title. |
readOnly | boolean | ReadOnlyConfig | — | Renders ReadOnlyBadge when truthy. |
actions | ReactNode | — | Trailing controls (e.g. Button group). |
className | string | — | Root class. |
PageHeader renders ReadOnlyBadge when readOnly is set. The same ReadOnlyBadge component is exported from @prepared911/ui-blocks if you need it outside PageHeader.
Used when readOnly is an object on PageHeader.
| Name | Type | Default | Description |
|---|---|---|---|
label | string | "Read only" (localized) | Badge label text. |
description | string | — | Tooltip body explaining why the page is read-only. |
requiredPermissions | ReactNode | — | Tooltip content listing permissions that would allow editing. |
| Name | Type | Default | Description |
|---|---|---|---|
config | ReadOnlyConfig | — | When omitted, shows the default read-only label with no tooltip. |