Typeset
Styles long-form text in docs, articles and chat messages.
Installation
pnpm dlx shadcn@latest add @paneui/typesetUsage
Examples
Presets
Use typeset-docs for notes and guides (14px), typeset-reading for articles (16px, set in the serif face) and typeset-chat for messages and streamed answers (14px, tighter flow). Each preset sets --typeset-size, --typeset-leading and --typeset-flow (reading also sets --typeset-font-body), so a one-off works too: className="typeset [--typeset-flow:1.5em]".
Components inside prose
Every library component carries data-slot and is skipped automatically. Wrap anything else in not-typeset. Utilities on an element override the typeset styles without !important.
Prose inside components
A component slot with .typeset or data-typeset styles its own content as prose again, inheriting the surrounding preset; components inside it stay skipped. TabsPanel, AccordionPanel, CollapsiblePanel and CardContent take a typeset prop that sets the attribute (and lets the accordion content keep the prose size and colour). data-typeset="docs", "reading" or "chat" picks a preset where there is no container. Re-enabling works three levels deep.
Streaming
Spacing only flows downward (margin-block-start), so a new block never restyles the ones above it.
Width
Typeset sets no max width; add max-w-reading (68ch) on the container.