Day separators
A ruled pencil line on each side of the day, written in the script font. The lines run level and stop just short of the words.
The pencil line between two days of a conversation, the red one where you stopped reading, and the quiet note that someone joined. A separator, a border or a plain line of small print.
npx shadcn@latest add @wobko/marker第一次使用?先把 registry 加进 components.json。 如何安装
A ruled pencil line on each side of the day, written in the script font. The lines run level and stop just short of the words.
tone="new" pulls the lines in red pencil and lays a highlighter swipe under the words, with a red asterisk in the margin. As a button it jumps to the first unread message.
A border marker heads a section with one line under it (pencil or a red wavy one). The default variant is small print with an icon: someone joined, a call started.
shadcn's `marker-demo`: a note with an icon, a running status with a spinner (`role="status"`, pulsing), a labeled separator and another note. The original's `shimmer` utility is not shipped, so the pulse here is Tailwind's `motion-safe:animate-pulse`.
shadcn's `marker-variants`: `default` is a line of small print, `separator` writes its words between two pencil lines, `border` draws one line under the row.
shadcn's `marker-status`: `role="status"` makes a marker a live region, so a screen reader hears "Compacting conversation" when it appears. A Spinner in MarkerIcon shows that something is running.
shadcn's `marker-shimmer`: a status line that breathes while it is streaming. shadcn ships a `shimmer` utility for this; Wobko does not have one yet, so the example uses `motion-safe:animate-pulse`, which stops for readers who ask for less motion.
shadcn's `marker-separator`: a labeled divider for a date or a turn of the conversation. The words are ordinary content (no `role="separator"`), so they are read out.
shadcn's `marker-border`: a row with an icon that keeps the default alignment and closes with a line under it, to set it off from the row below.
shadcn's `marker-icon`: MarkerIcon in front of the words in a plain marker, in a separator (the icon sits in the middle with the lines on both sides), and stacked above the words with `flex-col`. `book-open-check` is not drawn yet, so the last one uses `book-open`.
shadcn's `marker-link-button`: `asChild` makes the marker a real `<a>` or `<button>`, so it is focusable and announced as one. The button here says so with a toast. `rotate-ccw` is not drawn yet; the revert button wears `undo-2`.
A flex row. `separator` pulls a pencil line on each side of the words; `border` pulls one under them; `default` is small print. The lines are aria-hidden drawings, so they never affect layout or the reading order.
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| variant | "default" | "separator" | "border" | "default" | Where the line goes. |
| tone | "default" | "new" | "default" | `new` pulls the lines in red pencil, sets the words bold on a highlighter swipe and reddens a MarkerIcon: the unread marker. |
| rule | "line" | "wavy" | "line" | How a `border` marker's line is drawn. |
| asChild | boolean | false | Render your own element (a button that jumps to the first unread message, say). |
| seed | string | number | - | Pins the hand of the lines. |
CLI 会复制进你项目的文件。
正在加载源码