ns-ui

Loader Thread Spool

A loader that winds thread onto a spool while duration is unknown, then converts the same coil in place into a proportional gauge the instant total size arrives — the indeterminate-to-determinate handoff as one continuous object, never a spinner swapped for a bar.

Use when a fetch that starts with no known size and gains one mid-flight (headers land, then bytes stream) and you refuse to swap a spinner for a bar at that moment: pass total undefined and it winds a coil on a real 700ms clock, then converts the same coil in place into a proportional gauge once total arrives; pick loader-pendulum-sync instead when a total will never arrive, or progress-narrated when progress is determinate from the first frame and named phases matter more than bytes.

Install

npx shadcn add https://design.helpmarq.com/r/loader-thread-spool.json
  • loader
  • progress
  • progressbar
  • spinner
  • indeterminate
  • svg
  • spring
  • accessibility

ns-ui / loader-thread-spool

waiting on response headers

Props

PropTypeDefaultDescription
total?numbertotal size in bytes once known; leave undefined while indeterminate
loaded?numberbytes accumulated so far; only meaningful once `total` is known
className?string
aria-label?string