Marker
Displays an inline status, system note, bordered row, or labeled separator in a conversation.
The Marker component displays inline conversation markers such as status updates, system notes, bordered rows, and labeled separators. Compose it with Message in a conversation thread.
Installation
import { Marker } from "@o/pipeline/experimental/components/chat/marker";
Usage
import { IconCheck } from "@o/pipeline/experimental/icons";
import { Marker } from "@o/pipeline/experimental/components/chat/marker";
<Marker.Root>
<Marker.Icon>
<IconCheck />
</Marker.Icon>
<Marker.Content>Explored 4 files</Marker.Content>
</Marker.Root>
Composition
Use the following composition to build a marker:
Marker.Root
├── Marker.Icon
└── Marker.Content
Features
- Inline marker, bordered row, and labeled separator variants
- Decorative icon slot that is hidden from assistive tech
- Polymorphic root via
renderfor link and button markers - Pairs with the shimmer utility for streaming status text
- Customizable styling through the
classNameprop on every part
Variants
Use variant to switch between an inline marker, bordered row, and labeled separator.
| Variant | Description |
|---|---|
default | An inline marker for status, notes, and actions. |
border | A default marker with a bottom border under the row. |
separator | A centered label with divider lines on each side. |
Status
Set role="status" and include a Spinner for streaming or in-progress markers so updates are announced.
Shimmer
Add the shimmer utility class to Marker.Content for an animated streaming-text effect. The utility ships with the shadcn package — see the shimmer docs for installation.
Separator
Use the separator variant for labeled dividers, such as dates or section breaks, in a conversation.
Border
Use the border variant for status rows that should keep the default marker alignment while separating the next row.
With Icon
Use Marker.Icon to render an icon alongside the content. Use flex-col to stack the icon above the content.
Links and Buttons
Turn a marker into a link or button with the render prop on Marker.Root.
Accessibility
Marker.Root is presentational by default. The correct semantics depend on how you use it, so choose the role based on intent rather than relying on a single default.
Status and Progress
For streaming or progress markers such as “Thinking…” or a running tool, set role="status" so assistive tech announces the update as it appears. Marker.Root forwards role to the underlying element.
<Marker.Root role="status">
<Marker.Icon>
<Spinner />
</Marker.Icon>
<Marker.Content>Compacting conversation</Marker.Content>
</Marker.Root>
Labeled Separators
A separator that carries text, such as a date or a section label, needs no role. The divider lines are decorative CSS pseudo-elements, and the text is announced as ordinary content.
<Marker.Root variant="separator">
<Marker.Content>Today</Marker.Content>
</Marker.Root>
Note
Do not add role="separator" to a labeled divider. A separator takes its accessible name from aria-label, not from its text, and its contents are treated as presentational, so the visible label would not be announced. Reserve role="separator" for a divider with no meaningful text.
Bordered Markers
A bordered marker keeps the same semantics as the default marker. The bottom border is decorative, so choose role="status", render, or no role based on the marker’s purpose.
<Marker.Root variant="border">
<Marker.Icon>
<IconFileText />
</Marker.Icon>
<Marker.Content>Opened implementation notes</Marker.Content>
</Marker.Root>
Decorative Icons
Marker.Icon is decorative and hidden from assistive tech with aria-hidden, so the adjacent Marker.Content carries the meaning. For an icon-only marker, provide an aria-label or visible text so it is not announced as empty.
<Marker.Root aria-label="Synced">
<Marker.Icon>
<IconCheck />
</Marker.Icon>
</Marker.Root>
Interactive Markers
When a marker links or triggers an action, render it as a real <button> or <a> with the render prop so it is focusable and exposes the correct role. The accessible name comes from the marker text.
<Marker.Root render={<a href="/files" />}>
<Marker.Icon>
<IconFileText />
</Marker.Icon>
<Marker.Content>Explored 4 files</Marker.Content>
</Marker.Root>
API Reference
Marker.Root
The root marker element.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "border" | "separator" | "default" | The marker layout. |
render | ReactElement | function | - | Render as a different element, such as a link. |
className | string | - | Additional classes to apply to the root element. |
Marker.Icon
A decorative icon slot. Hidden from assistive tech with aria-hidden.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the icon slot. |
Marker.Content
The marker text content.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the content slot. |