text-dots
loading-ui/text-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/text-dots.jsonSource
1import { cn } from "@/lib/utils";23type TextDotsProps = React.ComponentProps<"span"> & {4 dots?: number;5};67function TextDots({8 className,9 children,10 dots = 3,11 style,12 ...props13}: TextDotsProps) {14 const dotCount = Number.isFinite(dots) ? Math.max(1, Math.floor(dots)) : 3;1516 return (17 <>18 <style>{`19 @keyframes loading-ui-text-dots {20 0%,21 100% {22 opacity: 0;23 }2425 50% {26 opacity: 1;27 }28 }29 `}</style>30 <span31 role="status"32 className={cn("inline-flex items-center", className)}33 style={style}34 {...props}35 >36 <span>{children}</span>37 <span aria-hidden="true" className="inline-flex">38 {Array.from({ length: dotCount }, (_, index) => (39 <span40 key={index}41 style={{42 animation:43 "loading-ui-text-dots var(--duration, 1.4s) infinite",44 animationDelay: `calc(var(--delay, 0.2s) * ${index + 1})`,45 }}46 >47 .48 </span>49 ))}50 </span>51 </span>52 </>53 );54}5556export { TextDots };
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 |
