Installation
Section titled “Installation”pnpm dlx shadcn@latest add pxl-ui/registry/conversation/marker
Copy and paste the following code into your project.
Update the import paths to match your project setup.
import { Marker, MarkerContent, MarkerIcon } from "@/components/features/pxl/conversation/marker"<Marker> <MarkerIcon> <CheckIcon /> </MarkerIcon> <MarkerContent>Explored 4 files</MarkerContent></Marker>Composition
Section titled “Composition”Use the following composition to build a marker:
Marker├── MarkerIcon└── MarkerContentFeatures
Section titled “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
shimmerutility for streaming status text - Customizable styling through the
classNameprop on every part
Variants
Section titled “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
Section titled “Status”Set role="status" and include a Spinner for streaming or in-progress markers so updates are announced.
Shimmer
Section titled “Shimmer”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.
Separator
Section titled “Separator”Use the separator variant for labeled dividers, such as dates or section breaks, in a conversation.
Border
Section titled “Border”Use the border variant for status rows that should keep the default marker alignment while separating the next row.
With Icon
Section titled “With Icon”Use MarkerIcon to render an icon alongside the content. Use flex-col to stack the icon above the content.
Links and Buttons
Section titled “Links and Buttons”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> )}Accessibility
Section titled “Accessibility”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.
Status and Progress
Section titled “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 forwards role to the underlying element.
Labeled Separators
Section titled “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 variant="separator"> <MarkerContent>Today</MarkerContent></Marker>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
Section titled “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 variant="border"> <MarkerIcon> <FileTextIcon /> </MarkerIcon> <MarkerContent>Opened implementation notes</MarkerContent></Marker>Decorative Icons
Section titled “Decorative Icons”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>Interactive Markers
Section titled “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 render={<a href="/files" />}> <MarkerIcon> <FileTextIcon /> </MarkerIcon> <MarkerContent>Explored 4 files</MarkerContent></Marker>API Reference
Section titled “API Reference”Marker
Section titled “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. |
MarkerIcon
Section titled “MarkerIcon”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. |
MarkerContent
Section titled “MarkerContent”The marker text content.
| Prop | Type | Default | Description |
|---|---|---|---|
className |
string |
- | Additional classes to apply to the content slot. |