Skip to content

<sessions-text>

Inline text.

Preact & React<Text>GroupTypographyDrawn asText

Preview

Drawn by the same renderers Sessions uses for your extension, from the DOM example beside it, without its event handlers.

When to use it

Body text. Use emphasis and tone rather than styling; the host picks colours that pass contrast on every brand.

In Preact and React, import the component of the same name from @sessions/apps/preact or @sessions/apps/react. Attributes become camelCase props, a boolean attribute is a boolean prop, and an event is an on prop that receives the event’s detail.

Attributes

Attribute
emphasis
Weight and prominence.subduedstrongProp emphasis
tone
A semantic colour.criticalProp tone
size
Text size.smallbaseProp size
Example
import {Text} from '@sessions/apps/preact';

<Text>
  Bring a mat and <Text emphasis="strong">water</Text>.
</Text>

In the same group