Skip to content
GitHub

Marker

Displays an inline status, system note, bordered row, or labeled separator in a conversation.

Switched to a new branch
Thinking...
Conversation compacted
Explored 4 files
import {
Marker,
MarkerContent,
MarkerIcon,
} from "@/components/features/pxl/conversation/marker";
import { Spinner } from "@/components/ui/pxl/spinner";
export default function MarkerDemo() {
return (
<div className="flex w-full max-w-sm flex-col gap-8 py-12">
<Marker>
<MarkerIcon>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 24 24"
>
<path d="M8 22H4v-2h4v2Zm-4-2H2v-4h2v4Zm6 0H8v-4h2v4Zm7-1h-5v-2h5v2Zm2-2h-2v-5h2v5ZM8 16H4v-2h4v2Zm-1-4H5V2h2v10Zm13-2h-4V8h4v2Zm-4-2h-2V4h2v4Zm6 0h-2V4h2v4Zm-2-4h-4V2h4v2Z" />
</svg>
</MarkerIcon>
<MarkerContent>Switched to a new branch</MarkerContent>
</Marker>
<Marker role="status">
<MarkerIcon>
<Spinner />
</MarkerIcon>
<MarkerContent className="shimmer">Thinking...</MarkerContent>
</Marker>
<Marker variant="separator">
<MarkerContent>Conversation compacted</MarkerContent>
</Marker>
<Marker>
<MarkerIcon>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="currentColor"
viewBox="0 0 24 24"
>
<path d="M22 22h-2v-2h2v2Zm-2-2h-2v-2h2v2Zm-6-2H6v-2h8v2Zm4 0h-2v-2h2v2ZM6 16H4v-2h2v2Zm10 0h-2v-2h2v2ZM4 14H2V6h2v8Zm14 0h-2V6h2v8ZM6 6H4V4h2v2Zm10 0h-2V4h2v2Zm-2-2H6V2h8v2Z" />
</svg>
</MarkerIcon>
<MarkerContent>Explored 4 files</MarkerContent>
</Marker>
</div>
);
}
pnpm dlx shadcn@latest add pxl-ui/registry/conversation/marker
import { Marker, MarkerContent, MarkerIcon } from "@/components/features/pxl/conversation/marker"
<Marker>
<MarkerIcon>
<CheckIcon />
</MarkerIcon>
<MarkerContent>Explored 4 files</MarkerContent>
</Marker>

Use the following composition to build a marker:

Marker
├── MarkerIcon
└── MarkerContent
  • Inline marker, bordered row, and labeled separator variants
  • Decorative icon slot that is hidden from assistive tech
  • Polymorphic root via render for link and button markers
  • Pairs with the shimmer utility for streaming status text
  • Customizable styling through the className prop on every part

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.

Set role="status" and include a Spinner for streaming or in-progress markers so updates are announced.

Add the shimmer utility class to MarkerContent for an animated streaming-text effect. The utility ships with the shadcn package — see the shimmer docs for installation.

Use the separator variant for labeled dividers, such as dates or section breaks, in a conversation.

Use the border variant for status rows that should keep the default marker alignment while separating the next row.

Use MarkerIcon to render an icon alongside the content. Use flex-col to stack the icon above the content.

Turn a marker into a link or button with the render prop on Marker.

import { Marker, MarkerContent } from "@/components/features/pxl/chats/marker"
export function MarkerLinkDemo() {
return (
<Marker render={<a href="#" />}>
<MarkerContent>View the pull request</MarkerContent>
</Marker>
)
}

Marker 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.

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 forwards role to the underlying element.

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 variant="separator">
<MarkerContent>Today</MarkerContent>
</Marker>

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 variant="border">
<MarkerIcon>
<FileTextIcon />
</MarkerIcon>
<MarkerContent>Opened implementation notes</MarkerContent>
</Marker>

MarkerIcon is decorative and hidden from assistive tech with aria-hidden, so the adjacent MarkerContent carries the meaning. For an icon-only marker, provide an aria-label or visible text so it is not announced as empty.

<Marker aria-label="Synced">
<MarkerIcon>
<CheckIcon />
</MarkerIcon>
</Marker>

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 render={<a href="/files" />}>
<MarkerIcon>
<FileTextIcon />
</MarkerIcon>
<MarkerContent>Explored 4 files</MarkerContent>
</Marker>

The root marker element. The file also exports markerVariants for composing the marker styles into custom components.

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.

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.

The marker text content.

Prop Type Default Description
className string - Additional classes to apply to the content slot.