Component docs
Loading
import { Heading } from "@pixxl-tools/components";
// In Server Components:
import { Heading } from "@pixxl-tools/components/server";| Prop | Type | Default | Description |
|---|---|---|---|
size | HeadingSize | — | Size from the shared scale (xs, sm, md, lg). |
as | HeadingElement | — | Element to render. |
count | ReactNode | — | A count shown as a badge after the text (e.g. the number of articles). Screen readers read the heading as "Articles, 2": the badge is a span after a visually hidden separator, never a block inside the heading. |
sizeHeadingSize
Size from the shared scale (xs, sm, md, lg).
asHeadingElement
Element to render.
countReactNode
A count shown as a badge after the text (e.g. the number of articles). Screen readers read the heading as "Articles, 2": the badge is a span after a visually hidden separator, never a block inside the heading.
Other props are passed to the root element (HTMLAttributes<HTMLHeadingElement>), including className, style, id and aria-* attributes.
Complex object props use fixed fixtures. Primitive props stay editable.
<Heading size="md">Components</Heading><Heading>Components</Heading><Heading size="md">Components</Heading>