# Highlight

Sentence with one phrase emphasized by a marker sweep, a hand-drawn underline or circle, or an outlined box.

```bash
npx shadcn add https://www.reelcn.dev/r/highlight.json
```

Usage:

```tsx
<Center>
  <Highlight text="Render videos with plain React" highlight="plain React" variant="marker" />
</Center>
```

Use for:

- Calling out the key phrase in a quote, claim or hook
- Tutorial titles that point at a single term

Avoid:

- Cycling through several words in one slot. Use `word-rotator`

Dependencies:

- `remotion`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| text? | `string` | `""` | Required unless `target` is given. |
| highlight? | `string` | `""` | Phrase inside `text` to emphasize (first match, any case). It never wraps, so keep it short. Required unless `target` is given. |
| target? | `{ anchors: Record<string, AnchorRect>; id: string; }` | — | A kit anchor's rect to highlight instead of a text phrase. Only with `variant: "box"` or `"circle"` (no text to flow `marker`/`underline` around). |
| variant? | `HighlightVariant` | `"marker"` |  |
| size? | `number` | `88` | Font size in design units. |
| weight? | `number` | — |  |
| font? | `"mono" \| "heading" \| "body"` | `"heading"` |  |
| color? | `string` | — | Sentence color. Defaults to the theme foreground. |
| highlightColor? | `string` | — | Marker, line and box color. Defaults to the theme highlight. |
| highlightTextColor? | `string` | — | Phrase color on top of the marker. Defaults to the theme foreground or background, whichever reads better. |
| align? | `"left" \| "right" \| "center"` | `"center"` |  |
| dimRest? | `boolean` | `false` | Fade the rest of the sentence as the mark draws, so the phrase is the only thing left in focus. |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |