CSS / SVG · 7.5 KB gzip
Pulse Sonar
Sonar geometry using pulse motion with state-specific transitions.
recipegenerated-recipepulsesonarstate-aware
Interactive preview
Usage
Packages are @vikast908/core and
@vikast908/loaders. Prefer 0.2.1+
(0.1.0 loaders is broken on npm).
npm install @vikast908/loaders@0.2.1 @vikast908/core@0.2.1
import '@vikast908/loaders/pulse-sonar'; <orbux-pulse-sonar state="thinking"></orbux-pulse-sonar>
Browser-only alternative: Download HTML (self-contained) or load the hosted ESM bundle:
<script type="module" src="http://localhost:4321/orbux/pulse-sonar.js"></script> <orbux-pulse-sonar state="thinking"></orbux-pulse-sonar>
Component source pulse-sonar.ts
// Generated by scripts/generate-recipe-catalog.mjs. Edit recipe-catalog.json or generated-loader.ts instead.
import { defineGeneratedLoader } from '../generated-loader.js';
/** Pulse Sonar: sonar geometry driven by the pulse motion recipe. */
export const OrbuxPulseSonar = defineGeneratedLoader('pulse-sonar');
declare global {
interface HTMLElementTagNameMap {
'orbux-pulse-sonar': InstanceType<typeof OrbuxPulseSonar>;
}
}
Depends on @vikast908/core. Paste the source, add the base
element, and set state from your agent code.
Attributes & properties
| Name | Type | Description |
|---|---|---|
state | AgentState | idle · thinking · streaming · tool-calling · waiting · done · error · cancelled |
size | CSS length | Overall square size. |
--orbux-width | CSS length | Optional inline-size override. |
--orbux-height | CSS length | Optional block-size override. |
speed | number | Animation speed multiplier (1 = default). |
label | string | Accessible label (defaults per state). |
paused | boolean | Freeze the animation. |
quiet | boolean | Silence the ARIA live region (name stays current). |
show-label | boolean | Render a visible caption beneath the loader. |
pulse() | method | Feed a data-activity burst (e.g. per streamed token). |
Respects prefers-reduced-motion, exposes
status/progressbar semantics with a debounced live label, and auto-pauses (sets
data-paused) when offscreen or the tab is hidden. Emits
orbux:statechange plus
orbux:done /
orbux:error /
orbux:cancelled. Map an agent SDK on with
@vikast908/core/adapters.