Skip to content
Haze UI

Marker

An inline line inside a conversation: a system note, a labeled divider such as New messages, or a status pill with icon and time.

pnpm dlx shadcn@latest add @haze/marker
Open preview in a new tab
Liveno JavaScript

When to use

  • A chat needs system lines such as someone joining or the agent pausing
  • A thread should split by day or mark where unread messages begin, with an optional link
  • An AI run shows its state between messages: paused, waiting for approval, failed

When not to use

  • You only need a plain labeled line with no icon, time or link. Use separator.
  • The entries are a dated history of events on their own. Use timeline.

Installation

Add the Haze registry to components.json once, then install Marker with the shadcn CLI. Works in any Astro project with Tailwind CSS v4.

pnpm dlx shadcn@latest add @haze/marker
First time? Registry and theme setup

1. Add to components.json:

{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

2. Install the theme once: npx shadcn@latest add @haze/theme, then import it after Tailwind in your global CSS:@import "./haze.css";

API reference

PropTypeDefaultDescription
variant"note" | "divider" | "status""note"Note is quiet text, divider has rules either side, status is a tinted pill.
labelstring"Ana Ilić joined the channel"The text of the marker.
icon"join" | "leave" | "info" | "clock" | "pause" | "check" | "alert" | "error" | "bot" | "calendar" | "unread"–Named icon from a fixed set. Status falls back to the icon of its tone.
tone"default" | "info" | "success" | "warning" | "destructive""default"Colors the icon and text, or the tint of a status pill.
timestring–ISO date-time for the time element. Pass a fixed value, never the current time.
timeLabelstring–Time as it reads, such as "09:12".
hrefstring–Turns the label into a link, for example to the first unread message.
align"center" | "start""center"Note only: where the line sits.
classstring–Extra classes on the root.
...restHTML attributes–Passed to the root element; add role="status" for a marker inserted after load.
icon slotslot–Replaces the named icon with your own SVG.

Keyboard interactions

Tab
Move to the label when it is a link.

Accessibility

  • A divider is a plain row: its label and time stay normal text in the reading order (browse mode reads them, unlike a separator whose name is often skipped), and only the two rule lines are hidden from assistive technology. With a link the label is a reachable link.
  • Notes and status pills are ordinary text in the reading order. Add role="status" through the rest attributes on a marker inserted after load.
  • Tone never carries meaning alone: the label says what happened, and every status shows an icon.
  • Icons are decorative and hidden from assistive technology.

Notes for AI

Copy into Claude Code, Cursor, Codex or any coding agent. Agents can also read the Markdown version of this page.

  • Install and use

    Install the Haze UI component "Marker" with `npx shadcn@latest add @haze/marker`. If components.json has no "@haze" registry yet, add "registries": { "@haze": "http://localhost:4329/r/{name}.json" }. If src/styles/haze.css does not exist yet, run `npx shadcn@latest add @haze/theme` once and import it from the global stylesheet after Tailwind. The CLI stops at an overwrite question when a Haze file already exists and differs, even with --yes, and then installs nothing after it: read its output. If the user has not edited their Haze files, re-run with --overwrite to take the registry versions; if they have, ask them before overwriting. Then import Marker from "@/components/haze/ui/marker.astro" (or the relative path) and render it where it fits the page. Keep Haze token classes (bg-background, text-muted-foreground, border-border...) and never hardcode colors. Docs: http://localhost:4329/ui/marker.md

  • Customize with real content

    Adapt the Haze marker ui for our product. Replace the demo values of these props with our real content: variant, label, icon, tone, time, timeLabel, href, align, class, ...rest, icon slot. Keep the layout, the heading level rules and these accessibility details: A divider is a plain row: its label and time stay normal text in the reading order (browse mode reads them, unlike a separator whose name is often skipped), and only the two rule lines are hidden from assistive technology. With a link the label is a reachable link. Notes and status pills are ordinary text in the reading order. Add role="status" through the rest attributes on a marker inserted after load. Tone never carries meaning alone: the label says what happened, and every status shows an icon. Icons are decorative and hidden from assistive technology. Do not add raw color classes; use the Haze tokens.

  • Choose the right block

    Before using marker, check it fits: use it when a chat needs system lines such as someone joining or the agent pausing; a thread should split by day or mark where unread messages begin, with an optional link; an ai run shows its state between messages: paused, waiting for approval, failed. Avoid it when you only need a plain labeled line with no icon, time or link. use separator.; the entries are a dated history of events on their own. use timeline.. Alternatives: @haze/separator, @haze/timeline, @haze/message.

Dependencies

  • npm: @lucide/astro
  • @haze/utils
  • @haze/theme (one-time setup)

Source · Original Haze UI work.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog