typing
loading-ui/typingFreeComponent
@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/typing.jsonSource
1import { cn } from "@/lib/utils";23function Typing({4 className,5 dots = 3,6 ...props7}: React.ComponentProps<"span"> & { dots?: number }) {8 return (9 <>10 <style>{`11 @keyframes loading-ui-typing {12 0%,13 100% {14 transform: translateY(0);15 opacity: 0.5;16 }1718 50% {19 transform: translateY(-50%);20 opacity: 1;21 }22 }23 `}</style>24 <span25 role="status"26 className={cn("inline-flex items-center gap-[12%]", className)}27 {...props}28 >29 {Array.from({ length: dots }, (_, index) => (30 <span31 key={index}32 aria-hidden="true"33 className="inline-block aspect-square grow rounded-full bg-current"34 style={{35 animation: "loading-ui-typing var(--duration, 1s) infinite",36 animationDelay: `calc(var(--delay, 160ms) * ${index})`,37 }}38 />39 ))}40 <span className="sr-only">Loading</span>41 </span>42 </>43 );44}4546export { Typing };
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 |
