Interaction Type Badge

An interaction's leading glyph in the workspace tables: a quiet grey puck with the type's icon (mail, phone or people), and a muted arrow in the corner for inbound or outbound. No colour: the icon says the type and the arrow says the direction. Named for screen readers, with the same words in a tooltip on hover.

BetaReady to use. Its API can still change in a minor release; the changelog says when.

import { InteractionTypeBadge } from "@leap-crm/design-system";

Playground

Change a prop and the component follows. Its code is under Props.

Props

type
direction
size

Best practices

When to use it, and the rules that apply in particular places.

GuidancePractice
DoUse it as the leading glyph of an interaction: size="sm" in a workspace row, md in the interaction panel.
DoPass direction for an email or a call, so the corner arrow shows whether the client contacted the firm or the firm contacted them.
DoSet label when the default name is not accurate, like "Email thread" for a row that holds several emails.
Don'tColour the puck by type or direction. The icon and the arrow carry the meaning, so it reads the same without colour.
Don'tUse IconTile for an interaction's type. This badge carries the name and tooltip a tile leaves out.

Props

PropTypeDefaultDescription
type *"email" | "phone" | "meeting"—email, phone or meeting: the icon.
direction"inbound" | "outbound"—Which way it went. A meeting may have none.
size"sm" | "md""sm"sm (20 px) in workspace rows, md (32 px) in the interaction panel.
labelstring—Overrides the name, like "Email thread".
classNamestring—Classes added to the root element, merged with its own. Tokens only.

Code

What the playground shows, ready to copy.

import { InteractionTypeBadge } from "@leap-crm/design-system";

<InteractionTypeBadge type="email" />