Add the Nook "Live cursors" component to this project, exactly as Nook ships it. Named collaborator pointers over a shared area, with normalized positions and theme colors. Steps 1. Check for `nook.json` in the project root. If it is missing, run `npx nook-ui@latest init` first (React or Next.js with Tailwind CSS v4). It adds the Nook tokens, the theme and `cn()`. 2. Run `npx nook-ui@latest add live-cursors`. It writes `components/ui/live-cursors.tsx` together with everything the component needs. Do not write the component from memory. 3. If you cannot run commands, fetch http://localhost:3000/r/live-cursors.json, write every entry of `files` to the path it names, install the packages in `dependencies`, and repeat for each name in `registryDependencies`. 4. Use it where I ask. Start from this example: ```tsx "use client"; import * as React from "react"; import { LiveCursors, useLocalCursor, type LiveCursor, type LocalCursorPosition } from "@/components/ui/live-cursors"; import { useReducedMotion } from "@/components/ui/loading"; const collaborators: LiveCursor[] = [ { id: "maya", name: "Maya", x: 0.22, y: 0.3, color: 1 }, { id: "alex", name: "Alex", x: 0.66, y: 0.54, color: 3 }, { id: "sam", name: "Sam", x: 0.42, y: 0.77, color: 5 }, ]; export default function LiveCursorsDefault() { const [cursors, setCursors] = React.useState(collaborators); const [local, setLocal] = React.useState(null); const area = useLocalCursor({ onChange: setLocal }); const reduced = useReducedMotion(); React.useEffect(() => { if (reduced) return; let step = 0; const motion = getComputedStyle(area.current!).getPropertyValue("--motion-pop").trim(); const interval = Number.parseFloat(motion) * (motion.endsWith("ms") ? 1 : 1000) * 6; if (!Number.isFinite(interval) || interval <= 0) return; const timer = window.setInterval(() => { step++; setCursors(collaborators.map((cursor, index) => ({ ...cursor, x: cursor.x + Math.sin(step * 0.4 + index) * 0.08, y: cursor.y + Math.cos(step * 0.35 + index) * 0.06 }))); }, interval); return () => window.clearInterval(timer); }, [reduced, area]); return

Ideas for the studio

3 people here ยท demo

Space

More room
for messy ideas.

Rituals

Friday
show & tell.

{local ? `Your pointer: ${local.x.toFixed(2)}, ${local.y.toFixed(2)}` : "Move your pointer over the board."}

; } ``` API - `LiveCursors`: An absolute overlay inside a positioned parent. Coordinates are clamped from zero through one. - `cursors` (`{ id; name; x; y; color?: 1 | 2 | 3 | 4 | 5 }[]`): Collaborators, normalized positions, and chart color numbers. - `labelPlacement` (`"above" | "below"`, default below): Preferred label position. Labels flip near the edges to stay visible. - `...props` (`React.HTMLAttributes`): Everything the native element accepts, such as `id`, `aria-*` and event handlers. - `useLocalCursor`: Returns a ref for the shared area. Broadcasts leading and trailing pointer positions and null on leave. - `onChange` (`(position: { x; y } | null) => void`): Send normalized coordinates to your own collaboration service. - `throttleMs` (`number`, default 50): Minimum interval between pointer broadcast windows, in milliseconds. Rules - Colors, radii, shadows and motion come from Nook tokens and classes such as `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg` and `h-control`. Never hard-code them. - Do not restyle or simplify the file. Change how it looks through `className`, its props and the theme. - It must keep working with the keyboard, in light and dark mode, and in the sharp, soft and bold styles. - Accessibility: A visually hidden list names everyone present. Remote pointer artwork is decorative and cannot block interaction. CSS movement transitions stop with reduced motion. The local cursor hook cancels trailing broadcasts on leave and unmount. Done when the component renders like the example in light and dark mode and the project type-checks.