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

- id: `lumen-typography` · version 1.0.0 · component · free
- category: Text & motion
- build: Base UI (one set of files; its dependencies follow the build)
- install (this build): `npx shadcn@latest add https://beautiful-ui.dev/r/lumen-typography.json`
- npm dependencies: none
- registry dependencies: utils, https://beautiful-ui.dev/r/lumen-foundation.json
- docs: https://beautiful-ui.dev/components/lumen-typography
- The install command carries everything this item needs (files, CSS, tokens, npm and registry dependencies). Prefer it to copying source by hand.

Long-form text in Lumen's voice: wrap docs, release notes, Markdown or chat answers in Prose and plain HTML takes a quiet hierarchy, bullets drawn as small lit cells, a filament beside quotes, and mono readouts for code and numbers.

## Build it
- Stack: React 19 (`ref` is a plain prop), TypeScript, Tailwind CSS v4 utilities, a shadcn-initialised project with the `@/*` alias.
- Packages: none beyond React.
- Files: `components/ui/lumen/typography.tsx`.
- Registry dependencies, installed with it automatically: shadcn `utils` (cn), `lumen-foundation`.
- Builds: one set of files for both, but its dependencies come in Base UI and Radix builds. 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: `Prose`, `Lead`, 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 { Lead, Prose } from "@/components/ui/lumen/typography";
```

## Parts

| Part | data-slot | What it is for |
|---|---|---|
| `Prose` | `prose` | The long-form wrapper. |
| `Lead` | `prose-lead` | Opening paragraph. |

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/typography.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
- typography, prose, markdown, rich text, article, docs page, release notes, blog post, chat answer, shadcn typography, Lumen
- Rendered Markdown or MDX
- Docs, changelogs, help articles
- Long AI answers

### Not when
- Interface labels and short UI text: those come with each component

## Mistakes
- Keep Prose for long-form text; don't wrap app UI in it
- Let the measure (68ch) stand: long lines tire the eye

## Usage

```tsx
import { Lead, Prose } from "@/components/ui/lumen/typography";

<Prose>
  <h1>Lumen, spring release</h1>
  <Lead>Story charts, saved views and a faster explorer.</Lead>
  <MDXContent />
</Prose>
```

## Props

| Prop | Type | Default | What it does |
|---|---|---|---|
| `Prose` | `div` |  | Wrap long-form HTML; every element inside takes Lumen type. |
| `Lead` | `p` |  | The larger opening paragraph. |

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

## 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 |
|---|---|
| — | Links inside are focusable |

## Motion inventory

| Interaction | What moves |
|---|---|
| None | Still, as text should be |

## Accessibility contract (preserve when editing)
- Plain semantic HTML; headings keep their levels
- Links are underlined, not colour alone

## Install

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

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

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

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

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

## Credits
- shadcn/ui typography (https://ui.shadcn.com/docs/components/typography)

## Source (Base UI build)

### components/ui/lumen/typography.tsx

```tsx
/**
 * Typography (Lumen Halo) v1.0.0 · Beautiful UI
 * Docs: https://beautiful-ui.dev/components/lumen-typography · Agent prompt: https://beautiful-ui.dev/md/lumen-typography.md
 * Licensed to the purchaser under the Beautiful UI license: https://beautiful-ui.dev/license
 */
import * as React from "react";
import { cn } from "@/lib/utils";

/*
 * Lumen Typography. Long-form text in Lumen's voice (docs, release notes, markdown, chat answers):
 * wrap it in <Prose> and plain HTML (h1–h4, p, lists, blockquote, code, pre, kbd, table, hr, mark)
 * takes Lumen's type: a quiet hierarchy, bullets drawn as small cells, a lit filament beside quotes,
 * mono readouts for code and numbers. Server-safe; works on Markdown output as is.
 */

function Prose({ className, ...props }: React.ComponentProps<"div">) {
  return <div data-slot="prose" className={cn(`lumen-prose`, className)} {...props} />;
}

/** The larger opening paragraph. */
function Lead({ className, ...props }: React.ComponentProps<"p">) {
  return <p data-slot="prose-lead" className={cn(`lumen-prose-lead`, className)} {...props} />;
}

export { Prose, Lead };
```

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

```css
@layer components {
  .lumen-prose {
    color: var(--gc-ink);
    font: 400 15px/1.7 var(--lumen-font-sans, var(--font-sans, var(--font-geist, var(--font-geist-sans, 'Geist')))), system-ui, sans-serif;
    max-width: 68ch;
    overflow-wrap: break-word;
  }
  .lumen-prose>*+* {
    margin-top: 1em;
  }
  .lumen-prose :is(h1,h2,h3,h4) {
    margin: 0;
    color: var(--gc-ink);
    font-family: var(--lumen-font-sans, var(--font-sans, var(--font-geist, var(--font-geist-sans, 'Geist')))), system-ui, sans-serif;
    text-wrap: balance;
  }
  .lumen-prose h1 {
    font-size: 32px;
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -.025em;
  }
  .lumen-prose h2 {
    margin-top: 2em;
    padding-top: 1.2em;
    border-top: 1px solid var(--gc-hair);
    font-size: 22px;
    line-height: 1.25;
    font-weight: 600;
    letter-spacing: -.02em;
  }
  .lumen-prose h3 {
    margin-top: 1.8em;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -.015em;
  }
  .lumen-prose h4 {
    margin-top: 1.6em;
    font: 500 12px/1.4 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gc-sec);
  }
  .lumen-prose :is(h1,h2,h3,h4)+* {
    margin-top: .6em;
  }
  .lumen-prose p {
    margin-bottom: 0;
  }
  .lumen-prose .lumen-prose-lead {
    font-size: 18px;
    line-height: 1.6;
    color: var(--gc-sec);
  }
  .lumen-prose a {
    color: var(--gc-ink);
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb,var(--gc-acc) 60%,transparent);
    text-underline-offset: 3px;
    text-decoration-thickness: 1.5px;
    transition: text-decoration-color min(0.2s, var(--gcp-cm)) ease;
  }
  @media (hover:hover) {
    .lumen-prose a:hover {
      text-decoration-color: var(--gc-acc);
    }
  }
  .lumen-prose strong {
    font-weight: 600;
  }
  .lumen-prose small {
    font-size: 13px;
    color: var(--gc-sec);
  }
  .lumen-prose mark {
    padding: 0 .2em;
    border-radius: calc(4px * var(--lumen-radius-k, 1));
    background: color-mix(in srgb,var(--gc-acc) 18%,transparent);
    color: inherit;
    box-shadow: 0 0 12px -4px color-mix(in srgb,var(--gc-acc) 60%,transparent);
  }
  .lumen-prose :is(ul,ol) {
    padding-inline-start: 1.4em;
  }
  .lumen-prose li+li {
    margin-top: .35em;
  }
  .lumen-prose ul {
    list-style: none;
  }
  .lumen-prose ul>li {
    position: relative;
  }
  .lumen-prose ul>li::before {
    content: "";
    position: absolute;
    inset-inline-start: -1.1em;
    top: .72em;
    width: 6px;
    height: 6px;
    border-radius: calc(2px * var(--lumen-radius-k, 1));
    background: var(--gc-acc);
    box-shadow: 0 0 8px color-mix(in srgb,var(--gc-acc) 55%,transparent);
  }
  .lumen-prose ol>li::marker {
    font: 500 13px/1 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
    color: var(--gc-sec);
  }
  .lumen-prose blockquote {
    position: relative;
    margin-inline: 0;
    padding-inline-start: 18px;
    color: var(--gc-sec);
  }
  .lumen-prose blockquote::before {
    content: "";
    position: absolute;
    inset-block: .2em;
    inset-inline-start: 0;
    width: 2px;
    border-radius: calc(2px * var(--lumen-radius-k, 1));
    background: linear-gradient(180deg,transparent,var(--gc-acc),transparent);
    box-shadow: 0 0 10px color-mix(in srgb,var(--gc-acc) 60%,transparent);
  }
  .lumen-prose :not(pre)>code {
    padding: .15em .4em;
    border-radius: calc(6px * var(--lumen-radius-k, 1));
    background: color-mix(in srgb,var(--gc-ink) 7%,transparent);
    box-shadow: inset 0 0 0 1px var(--gc-hair);
    font: 500 .88em/1 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
  }
  .lumen-prose pre {
    overflow-x: auto;
    padding: 14px 16px;
    border-radius: calc(12px * var(--lumen-radius-k, 1));
    background: color-mix(in srgb,var(--gc-ink) 5%,transparent);
    box-shadow: inset 0 0 0 1px var(--gc-hair),inset 0 1px 3px rgba(0,0,0,.12);
    font: 400 13px/1.6 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
  }
  .lumen-prose pre code {
    font: inherit;
  }
  .lumen-prose kbd {
    display: inline-block;
    min-width: 1.5em;
    padding: .1em .45em;
    border-radius: calc(6px * var(--lumen-radius-k, 1));
    background: color-mix(in srgb,var(--gc-ink) 6%,transparent);
    box-shadow: inset 0 0 0 1px var(--gc-hair),0 1px 0 var(--gc-hair);
    font: 500 .82em/1.4 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
    text-align: center;
  }
  .lumen-prose table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
  }
  .lumen-prose :is(th,td) {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gc-hair);
    text-align: start;
  }
  .lumen-prose th {
    font: 500 11px/1.4 var(--lumen-font-mono, var(--font-mono, var(--font-geist-mono, 'Geist Mono'))), ui-monospace, monospace;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--gc-sec);
  }
  .lumen-prose td {
    font-variant-numeric: tabular-nums;
  }
  .lumen-prose hr {
    position: relative;
    height: 1px;
    margin-block: 2em;
    border: 0;
    background: var(--gc-hair);
    overflow: visible;
  }
  .lumen-prose hr::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: calc(2px * var(--lumen-radius-k, 1));
    background: var(--gc-cellOff);
    box-shadow: 0 0 0 4px var(--gc-gap);
  }
  .lumen-prose :is(img,video) {
    max-width: 100%;
    border-radius: calc(12px * var(--lumen-radius-k, 1));
  }
  .lumen-prose figcaption {
    margin-top: .5em;
    font-size: 13px;
    color: var(--gc-sec);
  }
}
```

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.
