bobbing-dots
loading-ui/bobbing-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/bobbing-dots.jsonSource
1"use client";23import { motion } from "motion/react";4import { cn } from "@/lib/utils";56function BobbingDots({7 className,8 dots = 3,9 duration = 1,10 ...props11}: React.ComponentProps<"span"> & { dots?: number; duration?: number }) {12 const transition = (index: number) => ({13 duration,14 repeat: Infinity,15 repeatType: "loop" as const,16 delay: index * 0.2,17 ease: "easeInOut" as const,18 });1920 return (21 <span22 role="status"23 className={cn("inline-flex items-center gap-[12%]", className)}24 {...props}25 >26 {Array.from({ length: dots }, (_, index) => (27 <motion.span28 key={index}29 aria-hidden="true"30 initial={{ y: 0 }}31 animate={{ y: [0, "0.625em", 0] }}32 transition={transition(index)}33 className="inline-block aspect-square grow rounded-full bg-current shadow-sm"34 />35 ))}36 <span className="sr-only">Loading</span>37 </span>38 );39}4041export { BobbingDots };
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 | |
| 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 | |
| comet-spinnercomet-spinner | @loading-ui | Components | Free | no deps |
