pulsating-dots
loading-ui/pulsating-dotsFreeComponent
@loading-ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by @loading-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://loading-ui.com/r/pulsating-dots.jsonSource
1"use client";23import { motion } from "motion/react";4import { cn } from "@/lib/utils";56function PulsatingDots({7 className,8 dots = 3,9 duration = 1,10 ...props11}: React.ComponentProps<"span"> & { dots?: number; duration?: number }) {12 const dotCount = Number.isFinite(dots) ? Math.max(1, Math.floor(dots)) : 3;1314 return (15 <span16 role="status"17 className={cn("inline-flex items-center justify-center", className)}18 {...props}19 >20 <span aria-hidden="true" className="inline-flex w-full gap-[16%]">21 {Array.from({ length: dotCount }, (_, index) => (22 <motion.span23 key={index}24 className="inline-block aspect-square grow rounded-full bg-current"25 animate={{26 scale: [1, 1.5, 1],27 opacity: [0.5, 1, 0.5],28 }}29 transition={{30 duration,31 ease: "easeInOut",32 repeat: Infinity,33 delay: index * 0.3,34 }}35 />36 ))}37 </span>38 <span className="sr-only">Loading</span>39 </span>40 );41}4243export { PulsatingDots };
What it pulls in
npm packages
Files it writes
More from @loading-ui
All 50 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordion-loaderaccordion-loader | @loading-ui | Components | Free | no deps | |
| analyzing-imageanalyzing-image | @loading-ui | Components | Free | 1 dep | |
| arcarc | @loading-ui | Components | Free | no deps | |
| barsbars | @loading-ui | Components | Free | no deps | |
| bobbing-dotsbobbing-dots | @loading-ui | Components | Free | 1 dep | |
| bouncing-dotsbouncing-dots | @loading-ui | Components | Free | no deps | |
| classicclassic | @loading-ui | Components | Free | no deps | |
| clock-ringclock-ring | @loading-ui | Components | Free | no deps |
