Component/Loading
The loading.dev mark, its brightest block circling the ring.
Speed1000ms
Opacity100%
import { Loading } from "loading-dev"; export function LoadingDemo() { return <Loading size={48} />;}Size
Sets the spinner’s dimensions in pixels. The default value is 20
import { Loading } from "loading-dev"; export function LoadingSize() { return ( <div className="flex items-center gap-6"> <Loading size={16} /> <Loading size={24} /> <Loading size={40} /> </div> );}Custom Classes
You can use a custom className in case you need to tweak the spinner in a specific way that the library doesn’t provide.
import { Loading } from "loading-dev"; export function LoadingClassName() { return <Loading className="opacity-40" size={32} />;}Color
The loader inherits currentColor from the parent by default. You can tint it in any way you want. It accepts any valid CSS color.
import { Loading } from "loading-dev"; export function LoadingColor() { return <Loading color="#f97316" size={32} />;}Duration
Sets the speed in ms. Higher values are slower, smaller values are faster.
import { Loading } from "loading-dev"; export function LoadingDuration() { return <Loading duration={2000} size={32} />;}State
Pauses or resumes the animation and exposes the state of the spinner.
import { Loading } from "loading-dev"; export function LoadingPlayState() { return <Loading playState="paused" size={32} />;}