Skip to content

Component/Bouncing dots

Three staggered dots bouncing up and down.

Speed500ms
Opacity100%
import { BouncingDots } from "loading-dev"; export function BouncingDotsDemo() {  return <BouncingDots size={48} />;}

Size

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

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

Duration

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

import { BouncingDots } from "loading-dev"; export function BouncingDotsDuration() {  return <BouncingDots duration={1000} size={32} />;}

State

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

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