{"name":"marker","title":"Marker","description":"Displays an inline status, system note, bordered row, or labeled separator in a conversation.","installCommand":"bunx marko-ui add marker -y","usageTags":"<Marker>, <MarkerIcon>, <MarkerContent>","importSnippet":"import Marker from \"@/components/ui/marker/marker.marko\";\nimport MarkerIcon from \"@/components/ui/marker/icon.marko\";\nimport MarkerContent from \"@/components/ui/marker/content.marko\";","usageSnippet":"<Marker>\n  <MarkerIcon>\n    <Icon name=\"Check\"/>\n  </MarkerIcon>\n  <MarkerContent>Explored 4 files</MarkerContent>\n</Marker>","tags":["Marker","MarkerContent","MarkerIcon"],"parts":[],"props":[{"name":"asChild","type":"boolean","required":false,"description":"shadcn's source renders via Radix `Slot.Root` when `asChild` is set, so\nthe marker's own attrs/class merge onto the single child element instead\nof wrapping it in a `<div>`. Marko has no equivalent runtime slot-merge\nprimitive, so `asChild` is accepted for API parity but is a no-op here:\nwe always render the wrapping `<div>`. Content still renders normally."},{"name":"variant","type":"'default' | 'separator' | 'border' | null | undefined","required":false}],"events":[],"keyboard":[],"accessibilityNotes":["`Marker` is presentational by default — the correct role depends on how you use it, so choose based on intent rather than a single default.","For streaming or progress markers (e.g. \"Thinking...\", a running tool), set `role=\"status\"` so assistive tech announces the update as it appears. `Marker` forwards `role` to the underlying element.","A labeled separator (date, section label) needs no role — its divider lines are decorative CSS, and the label text is announced as ordinary content. Do not add `role=\"separator\"` to a labeled divider: that role takes its accessible name from `aria-label`, not from visible text, so the label would go unannounced. Reserve `role=\"separator\"` for a divider with no meaningful text.","A bordered marker (`variant=\"border\"`) keeps the same semantics as the default marker — its border is decorative, so choose `role=\"status\"` or no role based on the marker's purpose.","`MarkerIcon` is decorative and hidden from assistive tech with `aria-hidden`, so the adjacent `MarkerContent` carries the meaning. For an icon-only marker, provide an `aria-label` or visible text so it is not announced as empty.","When a marker links or triggers an action, upstream renders it as a real `<button>` or `<a>` via the `render` prop so it stays focusable with the correct role. Our port does not support `render` as a real polymorphism (see the Links and Buttons example) — wrap the marker markup in a real `<a>`/`<button>` yourself to get the same focusable, correctly-rendered result."],"examples":[{"id":"marker-icon","title":"With Icon","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerIcon from \"@marko-ui/shadcn/ui/marker/icon.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\nimport Icon from \"@marko-ui/shadcn/ui/icon/icon.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-12 py-12\">\n  <Marker>\n    <MarkerIcon>\n      <Icon name=\"GitBranchIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>Switched to a new branch</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\">\n    <MarkerIcon>\n      <Icon name=\"Search\"/>\n    </MarkerIcon>\n    <MarkerContent>Explored 4 files</MarkerContent>\n  </Marker>\n  <Marker class=\"flex-col\">\n    <MarkerIcon>\n      <Icon name=\"BookOpenIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>Syncing completed</MarkerContent>\n  </Marker>\n</div>","description":"Use `MarkerIcon` to render an icon alongside the content. Add `flex-col` to stack the icon above the content."},{"id":"marker-demo","title":"Basic","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerIcon from \"@marko-ui/shadcn/ui/marker/icon.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\nimport Spinner from \"@marko-ui/shadcn/ui/spinner/spinner.marko\";\nimport Icon from \"@marko-ui/shadcn/ui/icon/icon.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-8 py-12\">\n  <Marker>\n    <MarkerIcon>\n      <Icon name=\"GitBranchIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>Switched to a new branch</MarkerContent>\n  </Marker>\n  <Marker role=\"status\">\n    <MarkerIcon>\n      <Spinner/>\n    </MarkerIcon>\n    <MarkerContent class=\"shimmer\">Thinking...</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\">\n    <MarkerContent>Conversation compacted</MarkerContent>\n  </Marker>\n  <Marker>\n    <MarkerIcon>\n      <Icon name=\"Search\"/>\n    </MarkerIcon>\n    <MarkerContent>Explored 4 files</MarkerContent>\n  </Marker>\n</div>","description":"A marker with an icon, a status marker with a spinner and shimmering text, and a labeled separator."},{"id":"marker-variants","title":"Variants","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-8 py-12\">\n  <Marker>\n    <MarkerContent>A default marker for inline notes.</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\">\n    <MarkerContent>A separator marker</MarkerContent>\n  </Marker>\n  <Marker variant=\"border\">\n    <MarkerContent>A border marker for row boundaries.</MarkerContent>\n  </Marker>\n</div>","description":"Use `variant` (\"default\" | \"border\" | \"separator\") to switch between an inline marker, a bordered row, and a labeled separator."},{"id":"marker-status","title":"Status","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerIcon from \"@marko-ui/shadcn/ui/marker/icon.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\nimport Spinner from \"@marko-ui/shadcn/ui/spinner/spinner.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-8 py-12\">\n  <Marker role=\"status\">\n    <MarkerIcon>\n      <Spinner/>\n    </MarkerIcon>\n    <MarkerContent>Compacting conversation</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\" role=\"status\">\n    <MarkerIcon>\n      <Spinner/>\n    </MarkerIcon>\n    <MarkerContent>Running tests</MarkerContent>\n  </Marker>\n</div>","description":"Set `role=\"status\"` and include a `Spinner` for streaming or in-progress markers so updates are announced."},{"id":"marker-shimmer","title":"Shimmer","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-8 py-12\">\n  <Marker role=\"status\">\n    <MarkerContent class=\"shimmer\">Thinking...</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\" role=\"status\">\n    <MarkerContent class=\"shimmer\">Reading 4 files</MarkerContent>\n  </Marker>\n</div>","description":"Add the `shimmer` utility class to `MarkerContent` for an animated streaming-text effect."},{"id":"marker-separator","title":"Separator","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-8 py-12\">\n  <Marker variant=\"separator\">\n    <MarkerContent>Today</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\">\n    <MarkerContent>Worked for 42s</MarkerContent>\n  </Marker>\n  <Marker variant=\"separator\">\n    <MarkerContent>Conversation compacted</MarkerContent>\n  </Marker>\n</div>","description":"Use the `\"separator\"` variant for labeled dividers, such as dates or section breaks, in a conversation."},{"id":"marker-border","title":"Border","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerIcon from \"@marko-ui/shadcn/ui/marker/icon.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\nimport Icon from \"@marko-ui/shadcn/ui/icon/icon.marko\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-3 py-12\">\n  <Marker variant=\"border\">\n    <MarkerIcon>\n      <Icon name=\"GitBranchIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>Switched to release-candidate</MarkerContent>\n  </Marker>\n  <Marker variant=\"border\">\n    <MarkerIcon>\n      <Icon name=\"Search\"/>\n    </MarkerIcon>\n    <MarkerContent>Reviewed 8 related files</MarkerContent>\n  </Marker>\n  <Marker variant=\"border\">\n    <MarkerIcon>\n      <Icon name=\"FileTextIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>Opened implementation notes</MarkerContent>\n  </Marker>\n</div>","description":"Use the `\"border\"` variant for status rows that should keep the default marker alignment while separating the next row."},{"id":"marker-link-button","title":"Links and Buttons","source":"import Marker from \"@marko-ui/shadcn/ui/marker/marker.marko\";\nimport MarkerIcon from \"@marko-ui/shadcn/ui/marker/icon.marko\";\nimport MarkerContent from \"@marko-ui/shadcn/ui/marker/content.marko\";\nimport Icon from \"@marko-ui/shadcn/ui/icon/icon.marko\";\nimport Toaster from \"@marko-ui/shadcn/ui/toast/toast.marko\";\nimport { toast } from \"@marko-ui/shadcn/ui/toast/store.ts\";\n\n<div class=\"flex w-full max-w-sm flex-col gap-8 py-12\">\n  <a href=\"#links-and-buttons\" class=\"mu-marker group/marker relative flex w-full items-center\">\n    <MarkerIcon>\n      <Icon name=\"GitBranchIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>View the pull request</MarkerContent>\n  </a>\n  <button\n    type=\"button\"\n    class=\"mu-marker group/marker relative flex w-full items-center transition-colors hover:text-foreground\"\n    onClick() { toast.message({ title: \"You clicked the revert button\" }); }\n  >\n    <MarkerIcon>\n      <Icon name=\"RefreshCcwIcon\"/>\n    </MarkerIcon>\n    <MarkerContent>Revert this change</MarkerContent>\n  </button>\n</div>\n<Toaster/>","description":"Upstream turns a marker into a link or button via a `render` prop. Our `Marker` has no `render` prop and accepts `asChild` for API parity only — Marko has no runtime slot-merge primitive, so the prop is a no-op and `Marker` always renders its own wrapping `<div>`. This demo wraps the marker markup in a real `<a>`/`<button>` directly for the same focusable, correctly-rendered result."}],"importInstallCommand":"bun add @marko-ui/shadcn marko-zag","requires":["icon"],"nativeAttributes":"div","subcomponents":[{"name":"content","props":[],"nativeAttributes":"span"},{"name":"icon","props":[],"nativeAttributes":"span"}]}
