Skip to content
Back

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-pill
Which note-taking app suits a 6-person design team?
Thinking
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

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.

Terminal
oxyn add thinking-pill

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Default

The rays turn without rotating, the label rolls through the phases.

Which note-taking app suits a 6-person design team?
Thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Settle

Settles: after the last phase the check draws itself and the label reads "Thought for 11s".

Which note-taking app suits a 6-person design team?
Thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Done

Done.

Which note-taking app suits a 6-person design team?
Thought for 4s
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Small

Small: 26 px tall, 12 px label.

Which note-taking app suits a 6-person design team?
Thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Plain

Plain: just the spinner and the label.

Which note-taking app suits a 6-person design team?
Thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Classic

Classic style: a capsule with grey rays.

Which note-taking app suits a 6-person design team?
Thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Oxyn thinking loader

Extended: the loader with its own phases and timer.

Thinking
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ThinkingPill

PropTypeDefaultDescription
phasesVec<String>Default::default()Labels walked through, one after another.
intervalu64LOADER_INTERVALTime per phase, ms.
loopedboolDefault::default()Start over after the last phase instead of settling.
finishbooltrueSettle on done after the last phase (else hold it).
doneboolDefault::default()Done from the start (or controlled).
done_labelStringDefault::default()Label once done (empty: "Thought for Ns").
sizeString"md"`md` or `sm`.
variantString"pill"`pill` or `plain`.
nowrequiredClockMs—The clock.
styleStringDefault::default()`clean`, `classic`, or empty to follow `data-cstyle`.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
—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 ThinkingPill from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: ThinkingPillEl in oxyn_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.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI