- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Attachment
- Avatar
- Badge
- Breadcrumb
- Bubble
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Desktop Window
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Frame
- Heading
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Live Waveform
- Marker
- Menubar
- Message
- Message Scroller
- Meter
- Meter Ring
- Native Select
- Navigation Menu
- NumberCount
- Pagination
- Popover
- Progress
- Progress Ring
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Timeline
- Toast
- Toggle
- Toggle Group
- Tooltip
Displays an inline status, system note, bordered row, or labeled separator in a conversation.
import { IconGitBranch, IconSearch } from "@tabler/icons-react"
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"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.
Installation#
bunx --bun shadcn@latest add @ondo-ui/marker
Usage#
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"<Marker>
<MarkerIcon>
<CheckIcon />
</MarkerIcon>
<MarkerContent>Explored 4 files</MarkerContent>
</Marker>Composition#
Use the following composition to build a marker:
Marker
├── MarkerIcon
└── MarkerContentExamples#
Variants#
Use variant to switch between an inline marker, bordered row, and labeled separator.
import { Marker, MarkerContent } from "@/components/ui/marker"
export default function MarkerVariants() {| 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#
Set role="status" and include a Spinner for streaming or in-progress markers so updates are announced.
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"
import { Spinner } from "@/components/ui/spinner"
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.
import { Marker, MarkerContent } from "@/components/ui/marker"
export default function MarkerShimmer() {Separator#
Use the separator variant for labeled dividers, such as dates or section breaks, in a conversation.
import { Marker, MarkerContent } from "@/components/ui/marker"
export default function MarkerSeparator() {Border#
Use the border variant for status rows that should keep the default marker alignment while separating the next row.
import { IconFileDescription, IconGitBranch, IconSearch } from "@tabler/icons-react"
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"With Icon#
Use MarkerIcon to render an icon alongside the content. Use flex-col to stack the icon above the content.
import { IconBook, IconGitBranch, IconSearch } from "@tabler/icons-react"
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"Links and Buttons#
Turn a marker into a link or button with the render prop on Marker.
"use client"
import { IconArrowBackUp, IconGitBranch } from "@tabler/icons-react"API reference#
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#
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#
The marker text content.
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | Additional classes to apply to the content slot. |