Thinking pillPro
A small working pill for AI replies – an eight-ray spinner and a shimmering label that rolls through phases and settles on a check.
oxyn add thinking-pillThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- A small working pill for an AI reply while it thinks, searches and writes.
When not to use
- Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
- The model menu of an AI chat: use Model Picker instead.
- The prompt box for an agent, in six layouts: use Composer instead.
Installation
Thinking pill is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add thinking-pillUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Default
The rays turn without rotating, the label rolls through the phases.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Settle
Settles: after the last phase the check draws itself and the label reads "Thought for 11s".
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Done
Done.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Small
Small: 26 px tall, 12 px label.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Plain
Plain: just the spinner and the label.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Classic
Classic style: a capsule with grey rays.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Oxyn thinking loader
Extended: the loader with its own phases and timer.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ThinkingPill
| Prop | Type | Default | Description |
|---|---|---|---|
phases | Vec<String> | Default::default() | Labels walked through, one after another. |
interval | u64 | LOADER_INTERVAL | Time per phase, ms. |
looped | bool | Default::default() | Start over after the last phase instead of settling. |
finish | bool | true | Settle on done after the last phase (else hold it). |
done | bool | Default::default() | Done from the start (or controlled). |
done_label | String | Default::default() | Label once done (empty: "Thought for Ns"). |
size | String | "md" | `md` or `sm`. |
variant | String | "pill" | `pill` or `plain`. |
nowrequired | ClockMs | — | The clock. |
style | String | Default::default() | `clean`, `classic`, or empty to follow `data-cstyle`. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| — | Not interactive |
Accessibility
- role=status with aria-live=polite: each phase and the done label are read once.
- The spinner, the check and the label rolling out are aria-hidden.
- Reduced motion switches labels instantly and holds the spinner and shimmer still.
Responsive behaviour
- Sizes to its label on one line; keep phases to two to four words.
Edge cases (spec)
Sizes to its label on one line.
Notes for AI
- Import
ThinkingPillfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
ThinkingPillElinoxyn_gpui. - Props to set first:
now. - It reads a clock (
now) for live timers; pass one clock for the whole page rather than one per component. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.