Make your AI a shadcn expert

Shadcn Marker

React marker for inline status, system notes, and labeled separators in a thread. Built with TypeScript and Tailwind CSS for Next.js using Base UI — three layouts.

A marker is a quiet full-width row in a conversation — status, a system note, or a labeled date. It is presentational by default. Add role="status" when the text updates, or render when it is a link or button.

Scroll to load preview...

Usage

import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"
<Marker>
  <MarkerIcon>
    <CheckIcon />
  </MarkerIcon>
  <MarkerContent>Explored 4 files</MarkerContent>
</Marker>

variant is default, border, or separator. render turns the marker into a link or button.

Composition

MarkerIcon
MarkerContent

Variants

variant is the layout: inline, a bottom border, or a centered label with lines.

Scroll to load preview...

Status

role="status" plus a Spinner so a live update is announced.

Scroll to load preview...

Shimmer

className="shimmer" on MarkerContent for streaming text. Pair it with role="status".

Scroll to load preview...

Separator

variant="separator" for a date or section break. The lines are CSS — leave the role off.

Scroll to load preview...

Border

variant="border" keeps left-aligned text and draws a rule under the row.

Scroll to load preview...

With Icon

MarkerIcon sits beside the text. flex-col stacks the icon above.

Scroll to load preview...

render={<a />} or render={<button />} so the root is a real control. The name comes from MarkerContent.

Scroll to load preview...

API

Prop

Type

MarkerIcon is aria-hidden. MarkerContent is the text. The file also exports markerVariants.

Notes

Don't put role=separator on Today

A separator takes its name from aria-label and treats children as presentational — the visible "Today" would not be announced. Leave the role off. Reserve role="separator" for a line with no text.

MarkerIcon is hidden from assistive tech. An icon-only marker needs aria-label.

With other components

Questions

Was this page helpful?

Sign in to leave feedback.