Marker
Highlighter-pen <mark> in four tints that wraps cleanly across lines and can draw itself on, left to right, when it scrolls into view. Highlight marks every match of a search in a string, for transcripts and search results.
A clip is worth sharing when it is short, has a clear moment and ends before anyone asks why they are still watching.
2 matches
- Okay, the boss is at half health, swap to the long bow.
- Jane, hold the left door, I will pull it toward the bridge.
- Wait, the bridge is breaking. Jump, jump now!
- That was the cleanest boss fight we have ever had.
- Somebody clip that before it is gone.
import { Highlight, Marker } from "@/components/ui/marker";export function Pitch() { return ( <p> Clips that are <Marker draw>short</Marker> get shared{" "} <Marker draw delay={0.3} color="green"> three times more </Marker> . </p> );}// Search hits in a transcript line; query can be one term or several.export function TranscriptLine({ text, query,}: { text: string; query: string;}) { return <Highlight text={text} query={query} />;}<Marker>
Highlighter-pen <mark>. Wraps across lines cleanly; draw sweeps it on in view (instant with reduced motion, fully shown without JS).
colordefault"yellow""primary" | "yellow" | "green" | "red"Highlighter color.
delaydefault0numberSeconds before drawing; stagger several markers in one paragraph.
drawdefaultfalsebooleanDraws the highlight on, left to right, the first time it scrolls into view.
| Prop | Type | Default |
|---|---|---|
colorHighlighter color. | "primary" | "yellow" | "green" | "red" | "yellow" |
delaySeconds before drawing; stagger several markers in one paragraph. | number | 0 |
drawDraws the highlight on, left to right, the first time it scrolls into view. | boolean | false |
<Highlight>
Marks every case-insensitive match of query (one term or several) inside text.
query*string | string[]Term or terms to mark.
text*stringFull text to search in.
color"primary" | "yellow" | "green" | "red"Highlighter color.
| Prop | Type | Default |
|---|---|---|
query*Term or terms to mark. | string | string[] | — |
text*Full text to search in. | string | — |
colorHighlighter color. | "primary" | "yellow" | "green" | "red" | — |
* required. Every component also takes className.