Size sets the SVG box dimensions, with one SVG unit of padding on each side of its 64-unit view box. Strength is
a fraction of the ring's outer radius (default: 0.2, or 20%) and grows inward, keeping the stroke inside the
padding. A strength of 0 hides the stroke; 1 reaches the center. The playground displays progress and strength
as percentages.
For hover, active and focus-visible states to work properly, you need to define the 'icon-root' class on the
parent element (e.g. button). For custom active state, you can also use the 'active' class.
67%
2em
20%
Presets
Without a preset, the spinner uses 2em and 20% strength. Use preset="button" for 1.4em and 25%, or preset="inline" for 1em and 30%. Explicit size and strength values override the preset independently. Colors
and progress work the same for every preset.
Default: 2em / 20%
Button: 1.4em / 25%
Inline: 1em / 30%
Uploading
Progress Bar
In case you want to visualize the progress of a major action, the Spinner might be too subdued. In those cases,
you should use this beautiful ProgressBar component.
Page Progress
Mount one PageProgressRoot in the app layout, then import pageProgress from @leon8ix/jhana-ui/page-progress in any component or client-side function. Assign a fraction to pageProgress.value to update the shared indicator. Its manual popover keeps it visible over dialogs
and popovers, alongside notifications, without blocking clicks or taking focus. Set its color and strength on
the root; the defaults are var(--cAcc) and 2px.
Displays page-loading progress along the top edge of the viewport, with a glow that grows stronger toward the
leading edge. JavaScript smooths both frequent updates and large progress steps. Set pageProgress.value to 0, null or undefined when loading finishes. Clearing the value starts a
1700 ms fade of the highlight and glow toward 20%, regardless of the last progress value. Keeping a value of 1 retains the full glow. After a 1000 ms pause, the trail follows the same spring motion from left to
right through a soft gradient. The wipe catches the highlighted tip and its glow shortly after the front reaches its
last target. No extra wait is needed before clearing the value.
This is one shared progress channel: the app decides which operation owns it. Update it only in browser-side
code, and clear it when the owning operation finishes or is cancelled. If you need a locally controlled
renderer, PageProgress from the main package still accepts value, color and strength; that component does not manage popup layers.