ComponentsLumos 0.0.1Open component

Paragraph

Body text at any size, in any tag.

Paragraph renders body copy. Like Heading, it separates the element from the style: tag decides what it is in the markup, variant decides how it looks.

astro
<Paragraph variant="large" maxWidth={38}>
  A lead paragraph, capped at a comfortable measure.
</Paragraph>

Props

PropTypeDefaultWhat it does
renderbooleantrueSet to false to skip this component and everything inside it.
tag"p" | "span" | "div""p"The element to render. Use span for a run of text inside something else.
variant"inherit" | "display" | "h1"–"h6" | "large" | "main" | "small""inherit"The text style. inherit keeps whatever the surrounding context uses.
maxWidthnumberNoneA maximum width in ch units. Around 60–70 is a comfortable reading measure.

Measure

Long lines are hard to read. maxWidth is in ch units (the width of a zero in the current font), so the cap follows the type size rather than being a pixel value that stops making sense when the text scales.