Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Components

Free

Marker for Ark UI

A one-line note for a branch change, a running task, or a break between messages in a transcript. For React with Ark UI, when the system wrote the line, not a person.

Framework
UI library

Branch changes and running tasks show up as short lines in a transcript.

Use it for that one system note, in the same column as the messages. A rule with no words is a Separator. In React, Ark UI renders that row, so keep the note to one line.

Preview width

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
Use email insteadNo credit card

Anatomy

Marker anatomy: root, icon, content
Marker
โ”œโ”€โ”€ MarkerIcon
โ””โ”€โ”€ MarkerContent

Usage

import { CheckIcon } from "lucide-react";
import {
  Marker, MarkerContent, MarkerIcon,
} from "@/components/ui/marker";
<Marker className="max-w-full min-w-0">
  <MarkerIcon>
    <CheckIcon aria-hidden="true" className="size-4" />
  </MarkerIcon>
  <MarkerContent>Explored 4 files</MarkerContent>
</Marker>

Demos

Variants

Three values of variant, with no icons, so the shape is the only difference: default is an inline note, separator is a labeled rule, and border is a bordered row. Use default inside a transcript, separator for a break such as Today, and border when the notes are a short log you scan as separate items. The root sets data-variant if a style needs to target one.

Preview width

Status

role is status because the text changes on its own. A spinner sits in MarkerIcon for a compacting line, and again on a separator row while tests run. Use the role for a live task so assistive tech can announce the update, and skip it on a note that never changes. The icon stays decorative, and the sentence is what gets read.

Preview width

Shimmer

The words carry the motion: MarkerContent uses the shimmer class, on a plain status line and on a separator, for Thinking and for Reading 4 files. Use that class when a spinner would be one icon too many and the label itself should look in progress. It is not another variant, and the text still has to say what is happening. Motion with an empty label is just decoration.

Preview width

Separator

Three separator rows, with no icons, mark breaks in a transcript: Today, a duration, and conversation compacted. variant set to separator draws a rule with the label in it. If there is nothing to say, use a Separator and skip Marker. Keep the label short, because MarkerContent is one inline span, not a paragraph.

Preview width

Border

Three bordered rows, each with an icon: a branch switch, files reviewed, notes opened. The gap is tight so they read as a log rather than three unrelated sentences. Use variant border for completed events someone might scan later, where an inline note would disappear into the prose. It is still one note per marker, and it does not line up columns the way a table would.

Preview width

Icon

MarkerIcon holds the graphic and MarkerContent holds the words. One row is inline, one is a separator, and one is stacked with flex-col so the icon sits above the label. Icons are hidden from assistive tech, and the text is the name of the row. Add an icon when it helps a log be scanned, and leave it off when the words are the whole point.

Preview width

The marker is the control, not a wrapper around one. The first row is a link to the pull request, and the second is a button that reverts the change and shows a toast. Use a link when the row navigates, and a button when it performs an action. Do not nest an anchor inside MarkerContent, because the content text is the accessible name and the icon stays decorative.

Preview width

FAQ

What do the Marker variants change?

variant default is an inline note, separator is a labeled rule, and border is a bordered row, with default as the default. The root exposes data-variant so one style can be targeted without a new component. Put icons in MarkerIcon and the words in MarkerContent, and keep the meaning in the text because the icon is hidden from assistive tech.

How do I announce a live Marker?

Set role to status when the text updates on its own, such as a running task, which is what the status demo does with a spinner in MarkerIcon. The Shimmer demo uses that same role with a highlighted label. The icon stays decorative, so the text is what gets announced.

When should I use Marker instead of Separator?

Use Separator for a rule with no text. Use Marker with variant separator when the rule needs a label, such as a system note in a transcript. Marker is a full row, not a one-word badge. Keep the label in MarkerContent so the row still has an accessible name without the icon.

Can I put several lines in one Marker?

MarkerContent is a single inline span, meant for one short note. Stack several Marker rows when you have several notes, rather than forcing a paragraph into the content. The separator variant is still one label on a rule. For a conversation row with an avatar, use Message instead.

How do I style a Marker with Ark UI?

Edit the marker file under components/ui. Variant styles are the default, separator, and border classes, selected by the variant prop and reflected on data-variant. The icon slot does not shrink, and the content is allowed to wrap. Change those classes in the file so every marker picks up the same spacing.

How do I install Marker in React?

Run the command in the Installation section on this page, which adds Marker, MarkerIcon, and MarkerContent to your ui folder. Import the parts you need from that folder. The separator variant does not pull in Separator. The command uses the shadcn CLI.

API Reference

Marker

<div> data-slot="marker"

PropType
variant?"border" | "default" | "separator"

The visual style.

Type
"border" | "default" | "separator"
Default
"default"
asChild?boolean

Renders your child element as the marker, with its styles.

Default
false
className?string

Merged with the part's classes.

AttributeType
data-variant?string

Mirrors variant.

MarkerContent

<span> data-slot="marker-content"

PropType
className?string

Merged with the part's classes.

MarkerIcon

<span> data-slot="marker-icon"

PropType
className?string

Merged with the part's classes.

With other components