Text Loop Demo
sora-ui/demo-text-loopFreeComponent
Cycling headline built with TextLoop.
Install it
npx shadcn@latest add https://ui.soralabs.io.vn/r/demo-text-loop.jsonSource
1"use client";23import { cn } from "@/lib/utils";4import {5 TextLoop,6 type TextLoopProps,7} from "@/components/sora-ui/texts/text-loop";89const PHRASES = ["Design fast.", "Ship faster.", "Iterate forever."];1011export default function TextLoopExample({12 interval = 2,13 className = "font-medium text-2xl text-foreground",14}: Pick<TextLoopProps, "interval" | "className">) {15 return (16 <div className="relative inline-grid">17 {PHRASES.map((phrase) => (18 <span19 aria-hidden20 className={cn(21 className,22 "invisible whitespace-nowrap [grid-area:1/1]"23 )}24 key={phrase}25 >26 {phrase}27 </span>28 ))}29 <TextLoop30 className={cn(className, "[grid-area:1/1]")}31 interval={interval}32 >33 {PHRASES.map((phrase) => (34 <span key={phrase}>{phrase}</span>35 ))}36 </TextLoop>37 </div>38 );39}
What it pulls in
Other registry items
Files it writes
More from Sora UI
All 97 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Sora UI | Components | Free | 2 deps | |
| Border Trailborder-trail | Sora UI | Components | Free | 1 dep | |
| Bottom Sheetbottom-sheet | Sora UI | Components | Free | 2 deps | |
| Cursor Bubblecursor-bubble | Sora UI | Components | Free | 2 deps | |
| Cursor Trail Revealcursor-trail-reveal | Sora UI | Components | Free | 1 dep | |
| Custom Cursorcustom-cursor | Sora UI | Components | Free | 2 deps | |
| Accordion Demodemo-accordion | Sora UI | Components | Free | no deps | |
| Border Trail Demodemo-border-trail | Sora UI | Components | Free | no deps |
