Skip to content

<sessions-badge>

A small status label.

Preact & React<Badge>GroupActionsDrawn asTag

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

A compact tag beside a title or in a row.

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
tone
The badge tone.accenthighlightpositiveattentioninfocelebrationcautionProp tone
Example
import {Badge} from '@sessions/apps/preact';

<Badge tone="positive">Connected</Badge>

In the same group