Turn card Pro
Get Pro at $9
One payment, every Pro piece. $10 tomorrow.
Install
npx shadcn@latest add @mu-pro/turn-cardPro. Installs with your licence key through the @mu-pro registry; the key comes with Pro. Lands in components/mu/turn-card/ with the shared foundation.
Usage
import { TurnCard } from "@/components/mu/turn-card/TurnCard";
<TurnCard
path={route.polyline}
steps={[
{ instruction: "Head north on", street: "Gower St", at: 0 },
{ instruction: "Turn right onto", street: "Sunset Blvd", at: 700 },
{ instruction: "Arrive at", street: "Vine & Yucca", at: 2380 },
]}
position={metresAlong}
/>Source
How it works
Building with an agent? Hand it a ready prompt for this piece.
Input and reduced motion
- Pointer / touch: nothing to press; the card reads out what the host feeds it.
- Keyboard: no stops of its own; the instruction is announced through a polite live region when it changes.
- Reduced motion: each reading lands at once (no drive between readings), the street and the glyph swap without the slide, blur or fade, and there is no flare at the end; the camera and the bank are geometry, so they are the same.
- Off screen: nothing runs; back in view it stands where the latest reading is.
Props
| Prop | Default | What it does |
|---|---|---|
path | [] | [x, y][] in metres (x east, y north), or an encoded polyline string | the route |
position | — | 0 to the path's length, metres | where you are along it; wins over progress |
progress | 0 | 0–1 | where you are, as a share of the path |
steps | [] | { instruction, street, at, maneuver? }[] | the maneuvers in order; at is metres along the path, a step at 0 names the street you start on, and maneuver (straight, slight-left, slight-right, left, right, uturn, arrive) is read from the path's bend when left out |
onStep | — | (step, index) => void | the next maneuver changed (null past the last); never on mount |
size | "md" | "md", "sm" | md is the 330 tall panel; sm is a ride-status chip, a 64×48 scene beside the words |
units | "metric" | "metric", "imperial" | m and km (to 10 m), or ft and mi (to 50 ft) |
locale | the page's | any BCP 47 tag | how the distance's digits are written |
loading | false | — | the route is on its way: "Finding your route" |
error | — | a sentence | the position can't be trusted: said in the caps line, the route dims, everything else is kept |
accent | false | — | tints the route's light and the progress line toward --mu-signal |
labels | English | templates | approach ("In {distance} {instruction}"), cruise ("Continue for {distance} on"), arrived, turnLine ("{instruction} {street}"), cruiseLine, arrivedLine, loading, empty |
className | — | — | added to the root |
Sound
None. It loads in silence.
None: the card is watched, not pressed, and it never plays from a prop change. setMuted(true) from components/mu/sounds.ts still silences every other cottoncandy item at once.
Licence
Included with Pro: use it in unlimited end products for you and your clients; no reselling as a kit. See the licence.
Turn-by-turn: the road and its one route of light turn under a fixed puck, and the next street swaps in.
For navigation, delivery and ride trackingMore in Data & live