PageTitle

Deprecated: the title row of a page, now `PageHeader`.

Overview

Never in new code: use PageHeader, which also takes breadcrumbs, actions and tabs.

Page header

Do

Status

What is happening now

import { PageHeader } from "@hackcove/ui";

<PageHeader title="Status" subtitle="What is happening now" />
PageHeader is the top of a page: a title, a subtitle, and the fixed margin that puts every page's first block at the same height.
Don't

Status

What is happening now

import { PageTitle } from "@hackcove/ui";

<PageTitle title="Status" subtitle="What is happening now" />
PageTitle is deprecated and has no bottom margin, so a page that uses it sits at a different height. Use PageHeader.

Usage

  • Use PageHeader for the top of every page. PageTitle is the same title and subtitle without the bottom margin, so a page that uses it sits at a different height from the rest.
  • Move existing PageTitle uses to PageHeader; it takes the same title and subtitle.

Accessibility

  • The title is the page's <h1>, with the subtitle under it, as in PageHeader.
  • aria-* and data-* props go on the root element.

API

PageTitle


subtitle
Type
string

title required
Type
string