Foundations

Prose

@xui/prose

Typography for rendered markdown: styles the raw HTML a renderer produced, with no per-element classes to add. Every rule resolves to a semantic token rather than a grey of its own, and they are descendant selectors, so they reach content that arrived as a string just as readily as content written in a template.

Install

pnpm add @xui/prose

Add the barrel to a standalone component's imports:

import { XuiProseImports } from '@xui/prose';@Component({  imports: [XuiProseImports],  // …})

Examples

Default

Loading preview…

Compact

Loading preview…

Sizes

Loading preview…

Heading anchors

Loading preview…

API

XuiProseAnchor

componenth1[xuiProseAnchor],h2[xuiProseAnchor],h3[xuiProseAnchor],h4[xuiProseAnchor],h5[xuiProseAnchor],h6[xuiProseAnchor]

Makes a heading a linkable section: it carries the anchor id, and on hover or keyboard focus it offers a link to itself.

Inputs

NameTypeDefaultxuiProseAnchorrequiredstringThe heading's anchor id — both the element's id and the link's fragment.—linkLabelstringAccessible name of the self-link.'Link to this section'basePathstring | nullPath the fragment hangs off. Defaults to the page the heading is on. Not a bare #id, which resolves against the document's base URL: an Angular application ships <base href="/">, so every anchor on every page but the root would quietly point at the site root instead of down the page. Set this when the heading's page is not the one in the address bar.nullclassClassValueExtra classes, merged into the component's own rather than replacing them.''

XuiProse

directive[xuiProse]

Typography for rendered markdown: styles the raw HTML a renderer produced, with no per-element classes to add.

Variants

AxisOptionsDefaultdensitycomfortablecompactcomfortable

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the directive's own rather than replacing them.''sizeXuiProseVariants['size']The type scale the document is set at.this.config.sizedensityXuiProseVariants['density']How much air the document gets between its blocks.this.config.density

Source

libs/ui/prose/xui

xUI 3.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.