import { GitBranchIcon, MagnifyingGlassIcon } from "@phosphor-icons/react"import {
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.
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.
Thinking...
Reading 4 files
import { Marker, MarkerContent } from "@/components/ui/marker"export function MarkerShimmerDemo() {
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.
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.
A bordered marker keeps the same semantics as the default marker. The bottom border is decorative, so choose role="status", asChild, or no role based on the marker's purpose.
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.
When a marker links or triggers an action, render it as a real <button> or <a> with the asChild prop so it is focusable and exposes the correct role. The accessible name comes from the marker text.