Skip to content

Component/Phases

A moon moving through its phases.

Speed3000ms
Opacity100%
import { Phases } from "loading-dev"; export function PhasesDemo() {  return <Phases size={48} />;}

Size

Sets the spinner’s dimensions in pixels. The default value is 20

import { Phases } from "loading-dev"; export function PhasesSize() {  return (    <div className="flex items-center gap-6">      <Phases size={16} />      <Phases size={24} />      <Phases 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 { Phases } from "loading-dev"; export function PhasesClassName() {  return <Phases 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 { Phases } from "loading-dev"; export function PhasesColor() {  return <Phases color="#f97316" size={32} />;}

Duration

Sets the speed in ms. Higher values are slower, smaller values are faster.

import { Phases } from "loading-dev"; export function PhasesDuration() {  return <Phases duration={6000} size={32} />;}

State

Pauses or resumes the animation and exposes the state of the spinner.

import { Phases } from "loading-dev"; export function PhasesPlayState() {  return <Phases playState="paused" size={32} />;}