Your co-worker can show what it is talking about. When it says a customer’s name, that row lights up. It can circle the answer, bring a chart onto the page when it says “here’s the revenue chart”, put it away when it moves on, and make a roadmap’s milestones appear one by one as it names them. It can also turn a deck to the next slide, point at the button to press, zoom a map, pin a figure beside a chart, or dim the rest of the page. Every move is timed to the spoken word.
None of this needs permission. A move only changes what is shown; it never clicks, types, or changes anything in your app. Anything with consequences stays an action.
Showing is in early access and off until we switch it on for your workspace, so ask us to enable it. While it is off the co-worker makes no moves, and nothing is sent; your page’s own useStage controls still work.
Label the things
Put data-coworkkit-item on each thing the co-worker might talk about, set to the name it would say. That is the whole change for lighting and marking.
<table data-coworkkit-element="orders">
{orders.map((o) => (
<tr key={o.id} data-coworkkit-item={o.customer}>
…
</tr>
))}
</table>- The label is a spoken name, not an ID. Use what people say:
"Acme Europe", not"cust_8f2". We match it to the co-worker’s words, ignoring case and accents, and the longest name wins ( “Acme Europe” beats “Acme”). data-coworkkit-elementis optional. Put it once on the component’s container, with the same name you gaveuseElement. It tells us which table a row belongs to, so when the conversation is about invoices, the Acme in the invoices table lights up and not the Acme in orders.- Two things with the same name both light. They really are both Acme’s. In development the console warns you once.
The moves
| Move | What it does | What you declare |
|---|---|---|
light | Points at the thing being talked about right now. It moves with every mention, one thing at a time. | Nothing: a label is enough. |
mark | Circles a thing so it stays visible after the voice moves on: the answer, a warning, a recommendation. | Nothing: a label is enough. |
show | Brings a panel onto the page when the co-worker says it is showing it. On a list's items: they appear one by one as they are named. | moves: ["show"] on the element, or itemMoves: ["show"] for its items. |
hide | Puts a panel away when the co-worker moves on. | moves: ["hide"] on the element. |
turn | Shows one thing at a time, and the previous one leaves: slides, tabs, steps (“on to pricing”). | itemMoves: ["turn"] |
point | An arrow on a button or control, until the person presses it or speaks again (“press Export, top right”). While the arrow is on it, the thing gets no glow too. | itemMoves: ["point"] |
scroll | Brings a thing into view when the co-worker says “down here” or “below”. You rarely need it: whatever the co-worker shows already comes into view by itself. | itemMoves: ["scroll"], or moves: ["scroll"] for the whole element. |
zoom | Goes close on one part, and back out to the whole. Your component does the zooming. | itemMoves: ["zoom"] |
connect | Draws an arrow from one thing to another (“this cost feeds the total”). | itemMoves: ["connect"] on both ends. |
note | Pins a few of the co-worker’s own words beside a thing, such as “+12% since June”. | itemMoves: ["note"] |
play | Starts a clip at the moment being talked about. Your component plays it. | itemMoves: ["play"] for its moments, or moves: ["play"] for the whole clip. |
dim | Dims the rest of the page, so only the thing it is talking about stays lit. | itemMoves: ["dim"], or moves: ["dim"] for the whole element. |
Names said together glow together: when one sentence names several things (“Acme, Bolt and Cora are late”), they all stay lit, and the next sentence that names something starts a fresh glow. One effect at a time: a thing never shows the glow and the circle together. A circle on the lit thing is drawn when the sentence moves on.
Bring panels up and put them away
Declare the bigger moves on the element. The co-worker brings the panel up when it says it is showing it (“here’s the revenue chart”), never on a passing mention or a question, and puts it away when it moves on (“back to your orders”).
useElement({
name: "chart",
state: { quarters },
moves: ["show", "hide"],
});
// Render it by the stage state...
const chart = useStage("chart");
return chart.shown ? <RevenueChart /> : null;- Where it starts. An element that can be shown starts hidden; one that can only be hidden starts shown. Set
shownonuseElementto choose. The start applies with or without a session. - Your own buttons.
useStage("chart").show()and.hide()drive the same state, so a “Show chart” button and the co-worker never disagree. The co-worker never hides a panel your page showed. - No code at all. If the panel’s container carries
data-coworkkit-element, we setdata-coworkkit-shownon it and hide it while it is"false". Our rule has zero specificity, so your own CSS always wins.
Walkthroughs
Add "show" to itemMoves and the element’s items appear one at a time as the co-worker names them. A declared itemMoves list replaces the default (["light", "mark"]), so list every move you want. When it moves on, or goes quiet for two seconds, the rest appear.
useElement({
name: "roadmap",
state: { milestones },
moves: ["show", "hide"],
itemMoves: ["show", "light"], // replaces the default (light and mark)
});Turn slides, tabs and steps
With itemMoves: ["turn"], one of the element’s things is current at a time. When the co-worker says “on to pricing”, Pricing becomes current and the others leave. Every slide, tab or step it can turn to needs a label on the page, even if your component only renders the current one (a thumbnail strip or a list of steps is enough).
useElement({ name: "deck", itemMoves: ["turn"], current: "Intro" });
const deck = useStage("deck");
return <Deck slide={deck.current} />; // your own buttons call deck.turn("Pricing")No code at all: we set data-coworkkit-current on each labelled slide and hide the ones that are "false" (display: none, zero specificity).
Point, connect, note and focus
These four are drawn on our layer, so a label and one line are enough. They never take a click: the page underneath keeps working.
// "Press Export, top right": an arrow points at the button until they press it.
<nav data-coworkkit-element="toolbar">
<button data-coworkkit-item="Export">Export</button>
</nav>
useElement({ name: "toolbar", itemMoves: ["light", "point"] });
// Arrows between rows, the co-worker's numbers pinned beside them, and focus.
useElement({ name: "orders", itemMoves: ["light", "mark", "connect", "note", "dim"] });- point stays until the person presses the thing, speaks or types again, another point replaces it, or a minute passes. The co-worker never presses it for them.
- note only ever shows the co-worker’s own words, taken from the captions: a short figure such as “+12% since June”.
- dim lasts as long as the thing is lit, and lifts the moment the person clicks, types or scrolls. Your page stays clickable underneath.
- scroll is only for the co-worker’s own “down here” move. You don’t need it to bring things into view: whatever the co-worker shows comes into view by itself (see below).
Zoom and play: your component does it
A map, a chart or a 3D scene zooms with its own camera, and a video plays with its own player, so these two only set the stage state. We never start, stop or unmute media.
useElement({ name: "map", itemMoves: ["light", "zoom"] });
const map = useStage("map");
useEffect(() => (map.zoomed ? flyTo(map.zoomed) : flyHome()), [map.zoomed]);
useElement({ name: "demo", moves: ["play"], itemMoves: ["play"] });
const demo = useStage("demo");
useEffect(() => {
if (demo.playing) seekAndPlay(demo.playing.name); // start muted: the co-worker is the narrator
}, [demo.playing]);When the person touches the map or the player, it is theirs again: zoomed and playing go back to null.
When the co-worker makes these moves
- Only where you declared them. A page that declares none of the newer moves behaves exactly as before.
- Only when it says so. It turns when it says “on to…”, points when it says “press…”, zooms when it says “zoom” or “zoomed”. A passing mention never moves your page. For now these moves follow English sentences.
- What it shows comes into view. A thing it lights, circles, points at or pins a note to, and the deck, map or player it turns, zooms or plays, comes into view by itself when it is off screen. No extra setting: a move you allow on a thing includes bringing that thing into view. It scrolls at most once per reply, so the page never jumps about: a thing just past the edge is nudged into view, one far away is brought to the middle. It never scrolls in a written reply, right after the person scrolled, or with
intensityset to"off". - Some moves land a beat late. A turn, zoom or play can land up to 2.5 seconds after its word, since a new slide or a new view still makes sense a moment later. A glow, a circle or an arrow lands within a fraction of a second, or not at all.
- A glow can wait a moment. When a name might deserve a bigger move, such as the arrow for “press Export”, the glow waits for the co-worker’s decision, at most 0.7 seconds after the word. So you see the arrow, not a glow and then the arrow.
- The person wins. Nothing moves within two seconds of the person’s own click or scroll.
- Nothing blocks, nothing stays. Our drawings never take a click, a dim lasts only while its thing is lit, and every move ends on its own.
- Each move earns its place. The co-worker starts making a move once it has passed our accuracy test. Point, zoom and connect have passed; note, turn, play, dim and scroll’s “down here” are still being tuned. Until a move passes, your own controls can still use it through
useStage.
Custom looks
The glow and the circle are drawn on our own layer, on top of your page, so your components don’t change. For a look of your own, such as a bar on a canvas chart, read the stage:
const { shown, lit, marked, waiting, current, zoomed, playing } = useStage("chart");
// lit: the name being talked about, or null
// marked: the circled names · waiting: walkthrough items not reached yet
// current: the turned-to thing · zoomed: the zoomed-in thing, or null · playing: { name, at } or nullCSS-only pages can style the attributes we set on labelled nodes: data-coworkkit-lit, data-coworkkit-marked, data-coworkkit-shown, data-coworkkit-current and data-coworkkit-zoomed. The intensity prop on CoworkkitProvider applies too: "off" draws no glow or circle, and the stage state still updates.
When the AI writes back
When typing and written replies are on for your workspace (also in early access), a written reply has no voice to time the moves to. So they land with the reply, already in their final state: panels shown or put away, the answer circled, and the first thing it named lit for a moment. In the reply itself, every word that names a thing becomes pointable: point at it and that thing lights up, and comes into view if it is off screen. Turns, zooms, points, arrows and notes land with the reply too; a clip never starts by itself while the person reads. In voice, the moves follow the voice; in text, they follow the reader.
What we read
Only your labels and where the labelled things sit on the screen. We never read text, input values, or anything you didn’t label. The names go to our servers so the co-worker can match them; descriptions come from the state you already declare with useElement.
Troubleshooting
- Nothing lights. Showing may not be on for your workspace yet. Otherwise, check that the label is the name the co-worker says. A thing that is off screen comes into view as it lights, unless the person scrolled in the last two seconds.
- A panel never appears. An element with
moves: ["show"]starts hidden. The co-worker shows it when it says it is showing it; your own controls can calluseStage(name).show(). - A thing stopped lighting after I added a move. A declared
itemMoveslist replaces the default, so list"light"too. - The wrong Acme lights. Add
data-coworkkit-elementto each table so we know which one a row belongs to.