import { PageSection } from "@pixxl-tools/components";
// In Server Components:
import { PageSection } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
align | "center" | "start" | start | Header alignment of the section variant (default start). |
eyebrow | ReactNode | — | Small label above the title (marketing sections). |
title | ReactNode | — | Title (any content). |
variant | PageSectionVariant | — | Emphasis (solid, secondary, soft, outline, ghost). |
actions | ReactNode | — | Action slot (buttons or links). |
description | ReactNode | — | Supporting text. |
padding | PixxlPadding | — | Inner spacing. |
titleId | string | ${id}-title | id of the <h2> title (default ${id}-title when the section has an id). With a title id the section is aria-labelledby its heading — a named region landmark, also for code-formatted titles — unless you pass aria-label / aria-labelledby yourself. |
titleSize | "sm" | "md" | "lg" | "xl" | — | Size of the <h2> title (Heading sizes). Default: xl for the section variant (lg-ish 2xl text inside a PublicPage, so it stays below the page's h1) and sm for card. |
aligndefault start"center" | "start"
Header alignment of the section variant (default start).
eyebrowReactNode
Small label above the title (marketing sections).
titleReactNode
Title (any content).
variantPageSectionVariant
Emphasis (solid, secondary, soft, outline, ghost).
actionsReactNode
Action slot (buttons or links).
descriptionReactNode
Supporting text.
paddingPixxlPadding
Inner spacing.
titleIddefault ${id}-titlestring
id of the <h2> title (default ${id}-title when the section has an id). With a title id the section is aria-labelledby its heading — a named region landmark, also for code-formatted titles — unless you pass aria-label / aria-labelledby yourself.
titleSize"sm" | "md" | "lg" | "xl"
Size of the <h2> title (Heading sizes). Default: xl for the section variant (lg-ish 2xl text inside a PublicPage, so it stays below the page's h1) and sm for card.
Other props are passed to the root element (HTMLAttributes<HTMLElement>), including className, style, id and aria-* attributes.
Features
Sections space themselves with fluid vertical padding.
Complex object props use fixed fixtures. Primitive props stay editable.
<PageSection eyebrow="Features" title="Everything in one package" variant="section" align="start">…</PageSection>Features
Marketing sections use fluid spacing and a larger heading.
Section content
<PageSection variant="section" eyebrow="Features" title="Everything in one place" align="center" />Features
Sections space themselves with fluid vertical padding.
<PageSection eyebrow="Features" title="Everything in one package" variant="section" align="start">…</PageSection>