Marker
A note between messages: a date, a status or a divider.
@cupertinoui/markerRegistry JSON import { CheckCheckIcon, ClockIcon } from "lucide-react"
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/marker"
// Notes between messages: the date, and a status line.
export default function MarkerDemo() {
return (
<div className="flex w-full max-w-sm flex-col gap-4">
<Marker variant="separator">
<MarkerContent>Today 09:41</MarkerContent>
</Marker>
<Marker>
<MarkerIcon>
<CheckCheckIcon />
</MarkerIcon>
<MarkerContent>Read by Mia Appleseed</MarkerContent>
</Marker>
<Marker variant="border">
<MarkerIcon>
<ClockIcon />
</MarkerIcon>
<MarkerContent>Messages from the last 30 days</MarkerContent>
</Marker>
</div>
)
}Installation
pnpm dlx shadcn@latest add @cupertinoui/markerThe first install also adds the macOS theme. See Installation to set up the registry.
Usage
import { Marker, MarkerContent } from "@/components/ui/marker"
<Marker variant="separator">
<MarkerContent>Today 09:41</MarkerContent>
</Marker>API Reference
Every part forwards the props of the underlying element. The props below are the ones CupertinoUI adds or changes.
Marker
| Prop | Type | Description |
|---|---|---|
variant | "default" | "separator" | "border"Default: "default" | Plain, between lines, or above a rule. |
className | string | Extra classes, merged with the component's own. |
MarkerIcon / MarkerContent
| Prop | Type | Description |
|---|---|---|
className | string | Extra classes, merged with the component's own. |