A canvas particle scene for an AI hero. Loose tokens drift and gather into a line of answer text, then loosen again; or a team of agents, each a glowing core, passes calls as streams of particles. The pointer parts the particles and a click sends a pulse.
On this page
- The hero of an AI product page
- An empty state or a loading scene with some life
- A backdrop behind a headline, in a dark or light stage
Examples
Network on a light stage
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- scene
"answer"|"network"- Default
"answer" - Answer: tokens gather into a line of text and loosen again. Network: agents as glowing cores with orbiting particles; a call is a stream of particles from caller to callee.
- text
string- Default
"Three agents found the cause." - The line the tokens gather into (answer scene). Under about 40 characters; it wraps to two lines if it must.
- stage
"dark"|"light"|"auto"- Default
"dark" - Dark and light are fixed stages that ignore the page theme. Auto follows it.
- accent
string- Default
"var(--kn-accent, var(--primary))" - The colour of the formed text, the streaks and the pulse rings. A theme token, a CSS variable or any CSS colour. A colour too close to the stage is lifted until it reads.
- count
number- Default
by area - Most particles to draw. It can only lower the built-in budget: area based, at most 1600 on desktop and 700 under 720px wide.
- speed
number- Default
1 - Playback speed.
- interactive
boolean- Default
true - The pointer parts the particles and a click or tap sends a pulse.
- paused / onPausedChange
boolean / (paused: boolean) => void- Stops the scene where it is. Controlled: pair them. Without `paused` the pause button holds the state.
- pauseButton
boolean- Default
true - Show the pause button. The scene still pauses off screen, in a hidden tab and under reduced motion.
- onFrameTime
(ms: number) => void- How long one frame took to step and draw, for measuring. Nothing is timed when it is absent.
- onPulse
({ x, y }) => void- A click or tap sent a pulse, at this point in the scene's own px.
- label
string- The accessible description of the canvas. The default describes the scene. An empty string marks it decorative (hidden from screen readers), for a backdrop.
- className
string- On the root, a 16:9 box that fills its container. Give it your own aspect ratio or height.
| Prop | Type | Default | Description |
|---|---|---|---|
| scene | "answer" | "network" | "answer" | Answer: tokens gather into a line of text and loosen again. Network: agents as glowing cores with orbiting particles; a call is a stream of particles from caller to callee. |
| text | string | "Three agents found the cause." | The line the tokens gather into (answer scene). Under about 40 characters; it wraps to two lines if it must. |
| stage | "dark" | "light" | "auto" | "dark" | Dark and light are fixed stages that ignore the page theme. Auto follows it. |
| accent | string | "var(--kn-accent, var(--primary))" | The colour of the formed text, the streaks and the pulse rings. A theme token, a CSS variable or any CSS colour. A colour too close to the stage is lifted until it reads. |
| count | number | by area | Most particles to draw. It can only lower the built-in budget: area based, at most 1600 on desktop and 700 under 720px wide. |
| speed | number | 1 | Playback speed. |
| interactive | boolean | true | The pointer parts the particles and a click or tap sends a pulse. |
| paused / onPausedChange | boolean / (paused: boolean) => void | - | Stops the scene where it is. Controlled: pair them. Without `paused` the pause button holds the state. |
| pauseButton | boolean | true | Show the pause button. The scene still pauses off screen, in a hidden tab and under reduced motion. |
| onFrameTime | (ms: number) => void | - | How long one frame took to step and draw, for measuring. Nothing is timed when it is absent. |
| onPulse | ({ x, y }) => void | - | A click or tap sent a pulse, at this point in the scene's own px. |
| label | string | - | The accessible description of the canvas. The default describes the scene. An empty string marks it decorative (hidden from screen readers), for a backdrop. |
| className | string | - | On the root, a 16:9 box that fills its container. Give it your own aspect ratio or height. |
Performance
- One canvas, one frame loop, typed arrays for the particles, four batched fills. A frame at 1440 wide takes well under 2ms on a laptop; pass `onFrameTime` to measure it on your own page.
- The loop stops off screen, in a hidden tab, when paused and under reduced motion, so a page with the scene below the fold costs nothing until it scrolls in.
- Use `count` to lower the particle budget on a page with several scenes. It can never raise it.
Accessibility
- The canvas is an image with a description (`label`). The words the tokens form are in that description, so a screen reader gets them without the animation.
- The pause button is a real button with `aria-pressed` and a name that says what it will do. It is the only focus stop.
- Pointer and click are an extra: nothing in the scene needs them. Reduced motion gives one still frame and hides the pause button.
What it handles
- 01Draws up to 1600 particles on one canvas, fewer on a phone, with a frame loop that runs only while the scene is on screen, in a visible tab and not paused.
- 02Answer scene: loose tokens drift on a slow flow field, gather into a line of text you give it, hold, then loosen again, in a seven second loop.
- 03Network scene: 5 to 9 agents at different sizes and depths, each a bright core with a soft halo and a few orbiting particles. A link shows only while a call is live, as a stream of particles from caller to callee that fades after it lands.
- 04Parts the particles around the pointer, and sends a pulse ring through them on a click or tap. In the network, a click also fires a call from the nearest agent.
- 05Has a pause button, and pauses by itself off screen and in a hidden tab. Under reduced motion it draws one still frame, with the text formed or a call half way.
- 06Matches the stage: a fixed dark or light stage, or the page theme. The accent is lifted until it reads on the stage.
States
- Drift, gather, hold, release
- Particles follow the flow field, then spring to the text, then loosen
- Canvas frames (a spring, not a CSS transition); 7s loop
- Pointer moves over the scene
- Particles near the cursor are pushed out of a 90px circle
- Follows the frame loop
- Click or tap
- A pulse ring spreads and shoves the particles it crosses
- 900ms
- Pause button, off screen, hidden tab
- The last frame stays; playing carries on in place
- none
- Pause button hover and focus
- Colour and opacity change
- 120ms, ease out
- Reduced motion
- One still frame, no loop, no pause button
- 0ms
| State | What moves | Timing |
|---|---|---|
| Drift, gather, hold, release | Particles follow the flow field, then spring to the text, then loosen | Canvas frames (a spring, not a CSS transition); 7s loop |
| Pointer moves over the scene | Particles near the cursor are pushed out of a 90px circle | Follows the frame loop |
| Click or tap | A pulse ring spreads and shoves the particles it crosses | 900ms |
| Pause button, off screen, hidden tab | The last frame stays; playing carries on in place | none |
| Pause button hover and focus | Colour and opacity change | 120ms, ease out |
| Reduced motion | One still frame, no loop, no pause button | 0ms |
Works with
When to use
When to use
- The hero of an AI product page: tokens gathering into your headline's answer, or a team of agents passing calls.
- A backdrop for a launch page or a waitlist on a dark or light stage that moves only while it is on screen.
- An empty or loading state that should feel alive, where a still logo would not.
When not to use
- A quiet drifting background behind real content: use Node Field.
- A small agent graph for a card or a bento tile: use Run Pulse.
- Showing a real run with timings and costs: use Agent Graph.
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 Particle Hero to my app and wire it to my own data.
- I need the hero of an AI product page: tokens gathering into your headline's answer, or a team of agents passing calls. Set that up with the Knowns UI Particle Hero.
- Which Particle Hero props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "particle-hero" }) and search_docs({ query: "particle hero" }). Pro props, full examples and source come back once your license key is in the MCP config.