Skip to content

Component/Atom

Three rings tumbling inside a circle.

Speed1000ms
Opacity100%
import { Atom } from "loading-dev"; export function AtomDemo() {  return <Atom size={48} />;}

Size

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

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

Duration

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

import { Atom } from "loading-dev"; export function AtomDuration() {  return <Atom duration={2000} size={32} />;}

State

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

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

Easing

Controls how the spinner rotates. linear moves at a constant speed, ease-in-out starts slowly, speeds up, then slows down.stacked combines the two so it changes speed without stopping. The default easing is linear.

import { Atom } from "loading-dev"; export function AtomEasing() {  return (    <div className="flex items-center gap-6">      <Atom easing="linear" size={32} />      <Atom easing="ease-in-out" size={32} />      <Atom easing="stacked" size={32} />    </div>  );}