CharacterMarkMirror
Draws an already-running character again, somewhere else.
One engine, five characters, five inks. The mirrors are <use href> elements pointing at the source's root group.
Ink without a second animation
Ink is an inherited CSS custom property, so it resolves where the <use> element sits rather than where the source was defined. Each mirror sets its own --aora-fg and the shared geometry picks it up.
Size works the same way — it is set on the wrapper, not inside the SVG.
Ids must be unique per page
sourceId becomes a DOM id, and <use href="#id"> resolves to the first match in the document. Two sources with the same id on one page means every mirror points at the first one.
Prefer MarkStageProvider, which derives ids from useId and cannot collide — even with several providers on one page, which is exactly what a documentation site with several examples produces.
API
| Prop | Type | Default | Description |
|---|---|---|---|
sourceId* | string | — | Id of a mounted `CharacterMark`'s root group. |
children | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<AwaitedReactNode> | null | — | — |
className | string | — | — |
color | "black" | "brown" | "red" | "orange" | "yellow" | "green" | "cyan" | "blue" | "violet" | "magenta" | "pink" | "gray" | 'black' | — |
eyeColor | string | — | — |
face | "cute" | "eyes" | "line" | — | Face style of the source, echoed as `data-face`. The geometry itself comes from the source. |
lineWeight | number | — | Stroke weight of the source, echoed as `data-line-weight`. |
nose | "slant" | "angular" | "hook" | "long" | "curve" | "bow" | null | — | Nose of the source, echoed as `data-nose`. `null` means the source draws none. |
sizeCss | string | number | — | — |
sizePx | number | — | — |
state | "idle" | "sleeping" | "drowsy" | "bored" | "waking" | "powering-down" | "listening" | "thinking" | "searching" | "reading" | "writing" | "working" | "loading" | "progress" | "radar" | "orbit" | "dictating" | "uploading" | "sending" | "receiving" | "messaging" | "waiting" | "spawning" | "composing" | "dragging" | "happy" | "excited" | "laughing" | "playful" | "proud" | "celebrate" | "bouncing" | "shy" | "sad" | "angry" | "confused" | "suspicious" | "surprised" | "scared" | "curious" | "humming" | "alerting" | "notifying" | "refusing" | 'idle' | — |
style | CSSProperties | — | — |
styleId | StyleId | — | Style series of the source, echoed as `data-style`. |
styleOptions | Record<string, unknown> | — | Style parameters of the source, echoed as `data-style-options`. |
variant | StyleVariant | — | Variant of the source, echoed as `data-variant`. |
Next
- MarkStageProvider — share engines by appearance
- Performance — how to render hundreds of characters