Marker

Slant / People & chat

An inline note between turns of a conversation.

Demo

Usage

@tuttn/slant
import { Marker, Message, SparklesIcon, Thread } from '@tuttn/slant'

// Between messages in a Thread it stretches across the log, a hairline out to
// each side of the note. The slanted pixel leads it unless you pass an icon.
<Thread label="Conversation">
  <Message author="user">Go deeper on the migration.</Message>
  <Marker icon={<SparklesIcon size={13} />} time="14:02">Switched to Deep</Marker>
  <Message author="assistant">Here is the full plan.</Message>
</Thread>

// tone colours the mark only; the text stays muted.
<Marker tone="warning" time={<time dateTime="2026-10-31T09:58">09:58</time>}>Context compacted</Marker>
<Marker tone="neutral">Conversation started</Marker>

Props

PropTypeDefaultDescription
childrenReactNode—The note: "Switched to a faster model", "Context compacted".
iconReactNodethe slanted pixelDrawn before the text, in the tone's colour, and hidden from screen readers: the text says what happened.
toneTone'accent'Colours the mark: what kind of note it is. The text stays muted in every tone.
timeReactNode—When it happened, after the text, in the mono face: "14:02", a `<time>`.
…restHTMLAttributes—className, style, the ref and other attributes reach the root <div role="note">.

Accessibility

  • The marker is a role="note". Inside a Thread’s polite log, a marker added later is read out like a new message.
  • The icon is aria-hidden: the text says what happened, and the tone only colours the mark, so nothing depends on colour alone.
  • The text and the time are muted, which holds 4.5:1 on the background in every theme. A visually hidden comma keeps them apart when the note is read as one line.
  • The hairlines are drawn by CSS, not elements, so they add nothing to the reading order.

The row is centred, and under dir="rtl" it mirrors: the mark leads from the right. It rises in with the same short entrance as the messages around it, which reduced motion removes.