Component/Morph
A square rounding into a circle and back as it turns.
Speed1200ms
Opacity100%
import { Morph } from "loading-dev"; export function MorphDemo() { return <Morph size={48} />;}Size
Sets the spinner’s dimensions in pixels. The default value is 20
import { Morph } from "loading-dev"; export function MorphSize() { return ( <div className="flex items-center gap-6"> <Morph size={16} /> <Morph size={24} /> <Morph 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 { Morph } from "loading-dev"; export function MorphClassName() { return <Morph 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 { Morph } from "loading-dev"; export function MorphColor() { return <Morph color="#f97316" size={32} />;}Duration
Sets the speed in ms. Higher values are slower, smaller values are faster.
import { Morph } from "loading-dev"; export function MorphDuration() { return <Morph duration={2400} size={32} />;}State
Pauses or resumes the animation and exposes the state of the spinner.
import { Morph } from "loading-dev"; export function MorphPlayState() { return <Morph playState="paused" size={32} />;}