Marker
newExplored 4 files. An inline status, a bordered row or a labelled separator in a conversation.
Open Props in the corner of the example to try variant and color. Without color a marker is muted; with one, the text, the icon and the lines take that colour role, as an unread separator does. Any name declared on [data-slot][data-color] works too.
default is an inline note. border draws a line under the row. separator centres the label between two lines.
Installation
Usage
<script setup lang="ts">
import { Marker, MarkerContent, MarkerIcon } from '@/components/ui/marker'
</script>
<template>
<Marker>
<MarkerIcon>
<CheckIcon />
</MarkerIcon>
<MarkerContent>Explored 4 files</MarkerContent>
</Marker>
</template>
A marker is a quiet line between the louder parts of a conversation or a log: what an agent just did, where the day changes, where unread messages start. Ported from shadcn-vue, with a colour axis. Pair it with the shimmer utility for a status that is still running.
Examples
Links and buttons
With as-child, a marker renders your <a> or <button>, so it is focusable and announced as what it is. A link is underlined.
API Reference
class is also accepted on every part and merged over its classes.
Marker
class is also accepted on every part and merged over its classes with tailwind-merge.
| Prop | Default | Type and description |
|---|---|---|
| variant | "default" | NonNullable<"default" | "border" | "separator" | null | undefined>
|
| color | — | MarkerColor | (string & {})Colour role of the text, the icon and the lines. Muted without it. Any name declared on |
| asChild | — | booleanRender the single child, a link or a button, instead of a wrapper, merging the marker's attributes and classes onto it. |
| as | "div" | AsTag | ComponentThe element or component to render. |
| Slot | Scope and description |
|---|---|
| default | {}
|
MarkerIcon
| Slot | Scope and description |
|---|---|
| default | {}An icon or a spinner, hidden from assistive technology. |
MarkerContent
| Slot | Scope and description |
|---|---|
| default | {}The marker's text. Links inside it are underlined. |
class is also accepted on every part and merged over its classes with tailwind-merge.
Props
- variant
"default" NonNullable<"default" | "border" | "separator" | null | undefined>defaultis an inline note;borderdraws a line under the row;separatorcentres the label between two lines.- color
MarkerColor | (string & {})Colour role of the text, the icon and the lines. Muted without it. Any name declared on[data-slot][data-color]works too.- asChild
booleanRender the single child, a link or a button, instead of a wrapper, merging the marker's attributes and classes onto it.- as
"div" AsTag | ComponentThe element or component to render.
Slots
- default
{}MarkerIconandMarkerContent.
Slots
- default
{}An icon or a spinner, hidden from assistive technology.
Slots
- default
{}The marker's text. Links inside it are underlined.
Data attributes
| data-slot | Attributes | Description |
|---|---|---|
| marker | data-variant, data-color | The row. |
| marker-icon | — | The icon, hidden from assistive technology. |
| marker-content | — | The text. |
Accessibility
Give a marker that updates while something runs role="status", so a screen reader announces the change. A separator with a label needs no role: its lines are decorative pseudo-elements, and role="separator" would hide the label, since a separator takes its name from aria-label only. MarkerIcon is hidden from assistive technology, so a marker with only an icon needs an aria-label.