ProseLayout
A page of text: one reading column with the header inside it.
Overview
Privacy, terms, help or any page that is mostly paragraphs.
Article
Privacy
How we handle your data.
What we keep
We keep your account details and the quotes you send, and nothing else.
Who sees it
Only you and the people you invite to your organisation.
import { Body, ProseLayout, SectionHeading } from "@hackcove/ui";
<ProseLayout title="Privacy" subtitle="How we handle your data.">
<SectionHeading>What we keep</SectionHeading>
<Body as="p">We keep your account details and the quotes you send, and nothing else.</Body>
<SectionHeading>Who sees it</SectionHeading>
<Body as="p">Only you and the people you invite to your organisation.</Body>
</ProseLayout>Privacy
How we handle your data.
We keep your account details and the quotes you send, and nothing else. Only you and the people you invite to your organisation can see them.
import { Body, Card, ListLayout } from "@hackcove/ui";
<ListLayout title="Privacy" subtitle="How we handle your data.">
<Card>
<Body as="p">
We keep your account details and the quotes you send, and nothing else. Only you and the
people you invite to your organisation can see them.
</Body>
</Card>
</ListLayout>ListLayout is for lists: its content runs the full width, so lines of text get too long to read. Use ProseLayout.Full page
Privacy
How we handle your data.
What we keep
We keep your account details and the quotes you send, and nothing else.
Who sees it
Only you and the people you invite to your organisation.
import { AppShell, Body, NavTabs, ProseLayout, SectionHeading } from "@hackcove/ui";
<AppShell
brand={<a href="#">Hack Cove</a>}
nav={
<NavTabs
label="Main"
items={[
{ label: "Quotes", href: "#quotes", active: true },
{ label: "Clients", href: "#clients" },
]}
/>
}
>
<ProseLayout title="Privacy" subtitle="How we handle your data.">
<SectionHeading>What we keep</SectionHeading>
<Body as="p">We keep your account details and the quotes you send, and nothing else.</Body>
<SectionHeading>Who sees it</SectionHeading>
<Body as="p">Only you and the people you invite to your organisation.</Body>
</ProseLayout>
</AppShell>Usage
- The text is the
children:SectionHeadings andBody as="p"paragraphs, spacedmdapart. gappicks another spacing from the same scale (xstosection) for the whole page; the default is right for most pages.- The header sits inside the column, so its
actionsstay beside the text. - Data or cards in a grid are not prose: use
ListLayoutorCardGrid.
Accessibility
- The title is the page's
h1. - Use
SectionHeadingfor sections so the outline runs h1 then h2. data-*andaria-*go on the column's wrapper.
API
ProseLayout
A text page: header, then children stacked gap apart (md by default), all in one narrow (max-w-3xl) reading column that starts at the Container's left edge (it is not re-centred, so the title does not jump). Unlike FormLayout the header sits inside the column, so its actions stay beside the text instead of at the Container's far edge.
actionsRight of the title on sm and up, below it on a phone.
- Type
ReactNode
breadcrumbsA Breadcrumbs above the title.
- Type
ReactNode
gap- Type
"sm" | "md" | "lg" | "section" | "xs"
subtitle- Type
ReactNode
tabsA NavTabs (or similar) under the title.
- Type
ReactNode
title required- Type
ReactNode