Model logos orbiting your agent. A beam links the hub to the model in use; on a hand-over a spark runs along the ring to the next one.
Used for
- Model switching story
- Multi-model agent hero
- Provider hand-over demo
- Active model display
Examples
Installation
npx knowns-ui@latest add model-orbitFor Claude Code, Cursor or Codex: installs it and wires the props to your own data.
Paste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install prompt
Install Model orbit from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/model-orbit
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add model-orbit
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- components/ui/knowns/illustrations/illust-utils.ts
- components/ui/knowns/illustrations/use-in-view.ts
- lib/knowns/icons/actor-icon.tsx
- lib/knowns/icons/model-icons.tsx
- lib/knowns/icons/tool-icons.tsx
- lib/knowns/icons/model-icons.data.ts
- lib/knowns/icons/tool-icons.data.ts
- lib/knowns/icons/LICENSES.md
- components/ui/knowns/illustrations/model-orbit.tsx
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/model-orbit, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "model-orbit" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- models
{ name, model?, icon? }[]- Default
Claude, GPT, Gemini, Llama, Mistral, DeepSeek - 2–8 models on the ring; logos via modelIcon, otherwise initials.
- active
string- The model in use, by name (controlled). Changing it plays the hand-over.
- onActiveChange
(name) => void- Called on a click or an automatic hand-over.
- cycle
number- Default
3.6 - Seconds on each model before handing over by itself. 0 turns it off.
- spin
number- Default
64 - Seconds per turn of the ring. 0 holds it still. Hover holds it too.
- hub / hubLabel
ReactNode / string- Default
a hub mark / "Agent" - The agent's tile in the middle, and its name for the label.
- caption
ReactNode|false- Default
the active model - The pill under the hub.
- size
"sm"|"md"|"lg"|number- Default
"md" - Max width: 280, 380, 480 or px. Everything scales with the container.
- paused
boolean- Default
false - Hold the ring and the automatic hand-over.
- Hand-over
-- The old beam lets go, a spark runs along the ring to the next model, then its beam draws out from the hub and the chip lights up.
- Motion
-- CSS only (transform, opacity, stroke-dashoffset). Pauses offscreen, in hidden tabs and on paused; prefers-reduced-motion shows a still ring with the active link.
| Prop | Type | Default | Description |
|---|---|---|---|
| models | { name, model?, icon? }[] | Claude, GPT, Gemini, Llama, Mistral, DeepSeek | 2–8 models on the ring; logos via modelIcon, otherwise initials. |
| active | string | - | The model in use, by name (controlled). Changing it plays the hand-over. |
| onActiveChange | (name) => void | - | Called on a click or an automatic hand-over. |
| cycle | number | 3.6 | Seconds on each model before handing over by itself. 0 turns it off. |
| spin | number | 64 | Seconds per turn of the ring. 0 holds it still. Hover holds it too. |
| hub / hubLabel | ReactNode / string | a hub mark / "Agent" | The agent's tile in the middle, and its name for the label. |
| caption | ReactNode | false | the active model | The pill under the hub. |
| size | "sm" | "md" | "lg" | number | "md" | Max width: 280, 380, 480 or px. Everything scales with the container. |
| paused | boolean | false | Hold the ring and the automatic hand-over. |
| Hand-over | - | - | The old beam lets go, a spark runs along the ring to the next model, then its beam draws out from the hub and the chip lights up. |
| Motion | - | - | CSS only (transform, opacity, stroke-dashoffset). Pauses offscreen, in hidden tabs and on paused; prefers-reduced-motion shows a still ring with the active link. |
What it handles
- 01Seats two to eight `models` evenly on a ring around a hub tile, with logos picked from each `model` or `name`.
- 02Links the hub to the active model with a beam that draws out from the hub and carries a streak of traffic.
- 03Hands over by itself every `cycle` seconds (3.6 by default, 0 stops it): the old beam lets go, a spark runs along the ring and the next beam draws out.
- 04Follows your agent when `active` is set, and reports each change, from a click or from the cycle, through `onActiveChange`.
- 05Turns the ring once every `spin` seconds (64 by default, 0 holds it still) while each logo counter-rotates to stay upright, and hover stops the turn.
- 06Makes every model a button with `aria-pressed`, and shows the active name in a pill under the hub unless `caption` is false.
States
- First render
- The first model is active and its beam draws out
- none
- Ring turn
- The ring turns slowly in a loop that runs on its own
- none
- Chip becomes active
- The chip scales up with a coloured ring while the others dim
- 280ms, ease out
- Hub glow
- The glow behind the hub fades in for the new model
- 280ms, ease out
- Hand-over
- The old beam retracts, a spark crosses the ring, then the new beam draws out, as one sequence
- none
- Offscreen, hidden tab or paused
- The turn, the traffic and the automatic hand-over stop
- none
- Reduced motion
- The ring is still and the active link stays drawn
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | The first model is active and its beam draws out | none |
| Ring turn | The ring turns slowly in a loop that runs on its own | none |
| Chip becomes active | The chip scales up with a coloured ring while the others dim | 280ms, ease out |
| Hub glow | The glow behind the hub fades in for the new model | 280ms, ease out |
| Hand-over | The old beam retracts, a spark crosses the ring, then the new beam draws out, as one sequence | none |
| Offscreen, hidden tab or paused | The turn, the traffic and the automatic hand-over stop | none |
| Reduced motion | The ring is still and the active link stays drawn | 0ms |
Works with
When to use
When to use
- Showing that your agent switches between models, with the active one linked to the hub.
- Feature sections about routing or fallback between providers.
When not to use
- A static list of supported models: use Model Reel.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Model Orbit to my app and wire it to my own data.
- I need showing that your agent switches between models, with the active one linked to the hub. Set that up with the Knowns UI Model Orbit.
- Which Model Orbit props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "model-orbit" }) and search_docs({ query: "model orbit" }).