Shows an orb with a face that tells the user what an AI assistant is doing, such as thinking, reading, typing, working, or asking a question. Each mood plays its own CSS animation, the palette derives from one theme color, and the OrblingStatus part pairs a small orb with a shimmering label for chat status lines. Every part holds still when the user prefers reduced motion, and the component needs no WebGL or extra packages.
<script lang="ts">
import { Orbling } from "#lib/components/ui/orbling/index.js";
</script>
<Orbling mood="thinking" size="lg" />Run the command below to add the component to src/lib/components/ui/orbling.
pnx remote0 add https://plainsv.com/r/orbling.jsonSet mood to idle, thinking, reading, typing, working, asking, waiting, watching, surprised, sleepy, or error. The default is idle, a new mood starts its animation from the beginning, and watching turns the eyes toward the pointer.
thinking while the assistant works out an answerreading while it reads pages, files, or resultstyping while it writes the replyworking while a tool or task runsasking when it asks the user a question, then waiting until the user answerswatching for an empty state that waits on the usererror when something fails<Orbling mood="working" />Set variant to default, secondary, or destructive. The default variant is blue from --chart-1, secondary is grey from --muted-foreground, and destructive is red from --destructive.
<Orbling variant="secondary" />Set size to xs, sm, md, or lg, which sets a diameter of 16, 32, 72, or 120 pixels. The default is md.
<Orbling size="sm" />Set shape to circle, squircle, hexagon, diamond, heart, star, or blob. The default is circle, and every part that has an outline, such as the glow, the tint, and the typing dots, follows the shape.
<Orbling shape="heart" />Pass any SVG path to shape for a custom outline. Draw the path in a 100 by 100 box, since the orb stretches it to fill its diameter, and keep the middle open for the eyes.
<Orbling shape="M20 6 L80 6 Q94 6 94 20 L94 66 Q94 80 80 80 L44 80 L24 96 L26 80 L20 80 Q6 80 6 66 L6 20 Q6 6 20 6 Z" />Set --orbling-shape to any CSS mask image, such as an SVG file or a gradient, for outlines a path cannot draw. The working mood morphs any shape into its turning gear and back.
<Orbling style="--orbling-shape: url(/shapes/cloud.svg)" />Set --orbling-color to change the base color. The orb keeps the lightness of its original palette and takes the hue and chroma of the color you set, so any theme token works.
<Orbling style="--orbling-color: var(--chart-3)" />Use OrblingStatus for a status line in a chat. It shows a 16 pixel orb beside the mood label, such as "Thinking…", uses role="status" so screen readers announce changes, and takes mood, variant, shape, size, and a label that replaces the default text.
<script lang="ts">
import { OrblingStatus } from "#lib/components/ui/orbling/index.js";
</script>
<OrblingStatus mood="reading" label="Reading the docs…" />The orb is decorative by default, so screen readers skip it. Set label when the orb carries meaning, which gives it role="img" and an accessible name.
<Orbling mood="thinking" label="Assistant is thinking" />The Orbling and OrblingStatus props extend the native span attributes, and extra attributes pass through to the root. The package also exports MOODS, which maps each mood to its label, and MOOD_NAMES, which lists every mood, plus SHAPES, which maps each preset to its SVG path, and SHAPE_NAMES, which lists every shape.
interface Props extends CompProps<"span"> {
/** What the assistant is doing; defaults to `idle` */
mood?: Mood;
/** Orb colors: `default` is blue from `--chart-1`, `secondary` is grey, and `destructive` is red; `--orbling-color` overrides the base color */
variant?: "default" | "secondary" | "destructive";
/** Orb outline: a preset such as `squircle` or `heart`, or a custom SVG path in a 100 by 100 box; defaults to `circle`, and `--orbling-shape` overrides it with any mask image */
shape?: OrblingShape | (string & {});
/** Orb diameter on the shared scale; defaults to `md` */
size?: UiSize;
/** Accessible name; without it screen readers skip the orb */
label?: string;
}
interface StatusProps extends CompProps<"span"> {
/** What the assistant is doing; defaults to `idle` */
mood?: Mood;
/** Orb colors, as on `Orbling` */
variant?: "default" | "secondary" | "destructive";
/** Orb outline, as on `Orbling` */
shape?: OrblingShape | (string & {});
/** Label text and gap on the shared scale; defaults to `sm` */
size?: UiSize;
/** Status text; defaults to the mood label, such as "Thinking…" */
label?: string;
}Orbling is a Svelte port of orbling by Timotej Kochjar, released under the MIT License. The original React component and its source live at github.com/kochjar/orbling. This port keeps its moods and motion, replaces the WebGL heat shader with the original's CSS glow, and derives the palette from theme tokens.