# Marker (Lumen Halo): prompt.md (v1.0.0)

- id: `lumen-marker` · version 1.0.0 · component · free
- category: Feedback
- build: Base UI (this item also ships a Radix build)
- install (this build): `npx shadcn@latest add https://beautiful-ui.dev/r/lumen-marker.json`
- npm dependencies: @base-ui/react@^1, class-variance-authority@^0.7
- registry dependencies: utils, https://beautiful-ui.dev/r/lumen-foundation.json
- docs: https://beautiful-ui.dev/components/lumen-marker
- The install command carries everything this item needs (files, CSS, tokens, npm and registry dependencies). Prefer it to copying source by hand.

A quiet labelled line for feeds and lists: its icon is a status lamp, an unlit cell that lights with its tone (critical glows, live states pulse), and the separator variant makes date rulers and the unread line. shadcn's Marker, cut from Lumen glass.

## Build it
- Stack: React 19 (`ref` is a plain prop), TypeScript, Tailwind CSS v4 utilities, a shadcn-initialised project with the `@/*` alias.
- Packages: `@base-ui/react@^1`, `class-variance-authority@^0.7` (Base UI build); `class-variance-authority@^0.7`, `radix-ui@^1` (Radix build).
- Files: `components/ui/lumen/marker.tsx`; shared code: `lib/beautiful-ui/lumen/marker.tsx`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `lumen-foundation`.
- Builds: separate Base UI and Radix files. Install the one that matches the project (see Install): a free item's bare URL installs the Base UI build of it and its dependencies.
- Exports to keep: `Marker`, `MarkerIcon`, `MarkerContent`, and every exported type.
- CSS: the install merges this item's rules (the registry `css` field) into your global stylesheet, in `@layer components`, and adds the lumen foundation (tokens, keyframes, motion levels) once. Nothing to import by hand.
- Re-running `add` (or `--overwrite`) re-applies those rules: put overrides in your own CSS, never in the installed rules.
- Tokens: retheme with the `--lumen-*` custom properties (`--lumen-accent`, `--lumen-accent-text`, `--lumen-bad`, `--lumen-bad-text`, `--lumen-focus`, `--lumen-good`, `--lumen-good-text`, `--lumen-hairline`, `--lumen-ink`, `--lumen-muted-ink`, `--lumen-series-1`, `--lumen-series-2`, `--lumen-series-3`, `--lumen-series-4`, `--lumen-series-5`, `--lumen-series-6`, `--lumen-warn`, `--lumen-warn-text`); this item's CSS also reads `--lumen-font-mono`, `--lumen-font-sans`, `--lumen-radius-k`. Never add Tailwind colour classes inside the component.

```tsx
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/lumen/marker";
```

## Parts

| Part | data-slot | What it is for |
|---|---|---|
| `Marker` | `marker` | The line. |
| `MarkerIcon` | `marker-icon` | Your icon, or the status lamp. |
| `MarkerContent` | `marker-content` | The words. |

Style a part with `[data-slot="<slot>"]` selectors or its `className`; keep the attributes when editing.

## Sound
- Keep every `data-slot` and `data-sound` attribute: the sound layer reads them.
- Installing this item adds no audio. Nothing plays until the app mounts `GlassSoundProvider` once (install: `npx shadcn@latest add https://beautiful-ui.dev/r/glass-sound.json`, import from `@/components/beautiful-ui/glass-sound`); `GlassSoundToggle` is its mute control. Without a provider the audio engine never loads.

## Match the original
- Read `components/ui/lumen/marker.tsx` as the reference implementation before changing or recreating anything, and match it: sizes, colours per theme, motion timings, copy and behaviour.
- If you deviate (a prop you can't honour, a style you changed, a dependency you swapped), say so in your reply, part by part.
- Keep the accessibility contract, the keyboard map and the motion levels listed below.

## Use it when
- marker, status line, status dot, status lamp, date separator, unread line, feed divider, shadcn marker, Lumen
- A status line in a feed (Build passed in 42s)
- Date rulers and the unread line in a timeline or chat

### Not when
- A status that needs action: use Alert
- A label on a single item: use Badge

## Mistakes
- Don't rely on the lamp's colour alone: put the state in the words

## Usage

```tsx
import { Marker, MarkerContent, MarkerIcon } from "@/components/ui/lumen/marker";

<Marker>
  <MarkerIcon tone="success" />
  <MarkerContent><strong>Build passed</strong> in 42s · Today</MarkerContent>
</Marker>
<Marker variant="separator"><MarkerContent>Yesterday</MarkerContent></Marker>
```

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `variant` | `"default" \| "separator" \| "border"` | `"default"` | A line, a centred ruler, or a bordered label. |
| `MarkerIcon tone / pulse` | `"neutral" \| "info" \| "success" \| "warning" \| "critical" / boolean` | `"neutral" / false` | Beautiful UI: the lamp's tone; pulse for live states. Pass children for your own icon. |
| `render (Base UI) / asChild (Radix)` | `element / boolean` |  | Render as another element (an <a>, a <li>). |

Full docs: https://beautiful-ui.dev/components/lumen-marker

## Customising
- Colours: set the `--lumen-*` tokens on `:root`, or on a container with the `lumen-scope` class to retheme one area. Add the `lumen-inherit` class to follow your shadcn palette instead (`--chart-N`, `--destructive`).
- Dark mode follows the `.dark` class on an ancestor (the shadcn and next-themes convention).
- Update later by re-running the install with `--overwrite` (review the diff if you edited it). Changelog: https://beautiful-ui.dev/r/changelog.json

## Keyboard

| Keys | Action |
|---|---|
| — | Not focusable (links inside are) |

## Motion inventory

| Interaction | What moves |
|---|---|
| pulse | A slow breath on live states; still with reduced motion |

## Accessibility contract (preserve when editing)
- Plain text; the lamp is decorative (aria-hidden), so say the state in words

## Install

Base UI project (a base-* style in components.json):

```bash
npx shadcn@latest add https://beautiful-ui.dev/r/lumen-marker.json
```

Radix project (a radix-*, new-york or default style):

```bash
npx shadcn@latest add https://beautiful-ui.dev/r/radix-nova/lumen-marker.json
```

Or add the `@beautiful-ui` registry to components.json and run `npx shadcn@latest add @beautiful-ui/lumen-marker`: the CLI picks the build from your style.

## Credits
- Built on shadcn/ui (https://ui.shadcn.com)

## Source (Base UI build)

### components/ui/lumen/marker.tsx

```tsx
/**
 * Marker (Lumen Halo) v1.0.0 · Beautiful UI
 * Docs: https://beautiful-ui.dev/components/lumen-marker · Agent prompt: https://beautiful-ui.dev/md/lumen-marker.md
 * Licensed to the purchaser under the Beautiful UI license: https://beautiful-ui.dev/license
 */
import { mergeProps } from "@base-ui/react/merge-props";
import { useRender } from "@base-ui/react/use-render";
import type { VariantProps } from "class-variance-authority";
import { cn } from "@/lib/utils";
import { MarkerContent, MarkerIcon, markerVariants } from "@/lib/beautiful-ui/lumen/marker";

/*
 * Lumen Marker (Base UI build): shadcn's Marker, MarkerIcon and MarkerContent in Lumen Halo: a quiet
 * status line whose icon is a lamp that lights with its tone, a date ruler, the unread line. Marker
 * takes Base UI's `render` like shadcn's.
 */

function Marker({ className, variant = "default", render, ...props }: useRender.ComponentProps<"div"> & VariantProps<typeof markerVariants>) {
  return useRender({
    defaultTagName: "div",
    props: mergeProps<"div">({ className: cn(markerVariants({ variant, className })) }, props),
    render,
    state: { slot: "marker", variant },
  });
}

export { Marker, MarkerIcon, MarkerContent, markerVariants };
```

### lib/beautiful-ui/lumen/marker.tsx

```tsx
import * as React from "react";
import { cva } from "class-variance-authority";
import { cn } from "@/lib/utils";

/*
 * Lumen Marker's shared parts. shadcn's Marker in Lumen Halo: a quiet labelled point in a feed or a
 * list (a status line, a date ruler, the unread line). Its icon, when it has no child, is a status
 * lamp: an unlit cell that lights with a tone (info, success, warning, critical glows).
 */

const markerVariants = cva(`lumen-marker`, {
  variants: {
    variant: { default: "", separator: `lumen-marker-separator`, border: `lumen-marker-border` },
  },
  defaultVariants: { variant: "default" },
});

type Tone = "neutral" | "info" | "success" | "warning" | "critical";

function MarkerIcon({ className, tone = "neutral", pulse = false, children, ...props }: React.ComponentProps<"span"> & { /** Beautiful UI: the lamp's tone (without children). */ tone?: Tone; /** Beautiful UI: a slow pulse for live states. */ pulse?: boolean }) {
  return (
    <span data-slot="marker-icon" aria-hidden="true" data-tone={tone} data-pulse={pulse || undefined} className={cn(`lumen-marker-icon`, !children && `lumen-marker-lamp`, className)} {...props}>
      {children}
    </span>
  );
}

function MarkerContent({ className, ...props }: React.ComponentProps<"span">) {
  return <span data-slot="marker-content" className={cn(`lumen-marker-content`, className)} {...props} />;
}

export { markerVariants, MarkerIcon, MarkerContent, type Tone as MarkerTone };
```

### CSS (the registry `css` / `cssVars`, merged into the global stylesheet by the shadcn CLI)

```css
@layer components {
  @keyframes lumen-lamp-pulse {
    0%,100% {
      opacity: 1;
    }
    50% {
      opacity: .45;
    }
  }
  .lumen-marker {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    width: 100%;
    min-height: 16px;
    color: var(--gc-sec);
    font: 400 13px/1.45 var(--lumen-font-sans, var(--font-sans, var(--font-geist, var(--font-geist-sans, 'Geist')))), system-ui, sans-serif;
    text-align: start;
  }
  .lumen-marker a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  @media (hover:hover) {
    .lumen-marker a:hover {
      color: var(--gc-ink);
    }
  }
  .lumen-marker-separator::before,.lumen-marker-separator::after {
    content: "";
    flex: 1;
    min-width: 0;
    height: 1px;
    background: var(--gc-hair);
  }
  .lumen-marker-separator>.lumen-marker-content {
    flex: none;
    font: 500 11px/1 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-align: center;
  }
  .lumen-marker-border {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gc-hair);
  }
  .lumen-marker-icon {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
  }
  .lumen-marker-icon>svg {
    width: 16px;
    height: 16px;
  }
  .lumen-marker-lamp::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: calc(2.5px * var(--lumen-radius-k, 1));
    background: var(--gc-cellOff);
    box-shadow: inset 0 0 0 1px var(--gc-hair);
  }
  .lumen-marker-lamp[data-tone="info"]::before {
    background: var(--gc-acc);
    box-shadow: 0 0 8px color-mix(in srgb,var(--gc-acc) 60%,transparent);
  }
  .lumen-marker-lamp[data-tone="success"]::before {
    background: var(--gc-good);
    box-shadow: 0 0 8px color-mix(in srgb,var(--gc-good) 60%,transparent);
  }
  .lumen-marker-lamp[data-tone="warning"]::before {
    background: var(--gc-warn);
    box-shadow: 0 0 8px color-mix(in srgb,var(--gc-warn) 60%,transparent);
  }
  .lumen-marker-lamp[data-tone="critical"]::before {
    background: var(--gc-bad);
    box-shadow: 0 0 12px color-mix(in srgb,var(--gc-bad) 80%,transparent);
  }
  .lumen-marker-lamp[data-pulse]::before {
    animation: lumen-lamp-pulse calc(1.8s * var(--gcp-k,1)) ease-in-out infinite;
  }
  .lumen-marker-content {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .lumen-marker-content strong {
    color: var(--gc-ink);
    font-weight: 600;
  }
  @media (prefers-reduced-motion:reduce) {
    .lumen-marker-lamp[data-pulse]::before {
      animation: none;
    }
  }
}
```

The lumen foundation (the tokens listed above, keyframes and motion levels) installs once with the first component; its CSS is public at https://beautiful-ui.dev/r/lumen-foundation.json.
