Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Typography

Readable article text with a deliberate hierarchy.

Preview

Live preview

Changes apply to this preview only.

Article

A title, a lead, a paragraph and inline code.

A design system is a contract

Components agree on spacing, colour and behaviour before anyone writes a screen.

The token pipeline turns the primitives into CSS variables, then the provider exposes them to every component through data-pimolu-theme and data-pimolu-style.

Hierarchy

Size and weight communicate structure; the semantic tag keeps the document outline honest.

Release notes

Version 0.1.0 is ready.

The package adds the typography primitives, the form field wrapper and the new overlay components.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Scale

Enumerated from typographyVariantMap: xs to 3xl.

Open preview

Weights

normal, medium, semibold and bold.

Open preview

Tones

Semantic colours that stay readable in light, dark and every preset.

Open preview

Usage

Choose semantic heading levels independently from visual size.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluTextProps

Type source
PimoluTextProps public API
NameTypeDefaultDescription
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined"2xl"Component size.
weight"normal" | "medium" | "bold" | "semibold" | undefined"semibold"Public Pimolu prop; see the source declaration for details.
tone"primary" | "success" | "warning" | "danger" | "default" | "muted" | undefined"default"Public Pimolu prop; see the source declaration for details.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLSpanElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLSpanElement> | undefined—Standard React/HTML attribute.
size

"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined

Default: "2xl"

Component size.

weight

"normal" | "medium" | "bold" | "semibold" | undefined

Default: "semibold"

Public Pimolu prop; see the source declaration for details.

tone

"primary" | "success" | "warning" | "danger" | "default" | "muted" | undefined

Default: "default"

Public Pimolu prop; see the source declaration for details.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLSpanElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLSpanElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluParagraphProps

Type source
PimoluParagraphProps public API
NameTypeDefaultDescription
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined"2xl"Component size.
weight"normal" | "medium" | "bold" | "semibold" | undefined"semibold"Public Pimolu prop; see the source declaration for details.
tone"primary" | "success" | "warning" | "danger" | "default" | "muted" | undefined"default"Public Pimolu prop; see the source declaration for details.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLParagraphElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLParagraphElement> | undefined—Standard React/HTML attribute.
size

"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined

Default: "2xl"

Component size.

weight

"normal" | "medium" | "bold" | "semibold" | undefined

Default: "semibold"

Public Pimolu prop; see the source declaration for details.

tone

"primary" | "success" | "warning" | "danger" | "default" | "muted" | undefined

Default: "default"

Public Pimolu prop; see the source declaration for details.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLParagraphElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLParagraphElement> | undefined

No default extracted.

Standard React/HTML attribute.

PimoluHeadingProps

Type source
PimoluHeadingProps public API
NameTypeDefaultDescription
levelPimoluHeadingLevel | undefined2Semantic level, also the default visual size. Defaults to 2.
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined"2xl"Override the visual size that follows the level.
weight"normal" | "medium" | "bold" | "semibold" | undefined"semibold"Public Pimolu prop; see the source declaration for details.
tone"primary" | "success" | "warning" | "danger" | "default" | "muted" | undefined"default"Public Pimolu prop; see the source declaration for details.
childrenRequiredReactNode—Public Pimolu prop; see the source declaration for details.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
onChangeChangeEventHandler<HTMLHeadingElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLHeadingElement> | undefined—Standard React/HTML attribute.
level

PimoluHeadingLevel | undefined

Default: 2

Semantic level, also the default visual size. Defaults to 2.

size

"xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | undefined

Default: "2xl"

Override the visual size that follows the level.

weight

"normal" | "medium" | "bold" | "semibold" | undefined

Default: "semibold"

Public Pimolu prop; see the source declaration for details.

tone

"primary" | "success" | "warning" | "danger" | "default" | "muted" | undefined

Default: "default"

Public Pimolu prop; see the source declaration for details.

childrenRequired

ReactNode

No default extracted.

Public Pimolu prop; see the source declaration for details.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

onChange

ChangeEventHandler<HTMLHeadingElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLHeadingElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Preserve document order, sufficient line height and zoom without clipping.
Read the accessibility guide →