Text Morph Demo
sora-ui/demo-text-morphFreeComponent
Continue / Confirm pill button with per-character layout morph.
Install it
npx shadcn@latest add https://ui.soralabs.io.vn/r/demo-text-morph.jsonSource
1"use client";23import { cn } from "@/lib/utils";4import { useState } from "react";5import { TextMorph } from "@/components/sora-ui/texts/text-morph";67/** Docs preview — click toggles Continue / Confirm with layout morph. */8export default function TextMorphPlayground() {9 const [text, setText] = useState("Continue");1011 return (12 <button13 className={cn(14 "flex h-10 w-[120px] shrink-0 cursor-pointer items-center justify-center rounded-full",15 "bg-foreground px-4 font-medium text-background text-base shadow-xs transition-colors",16 "hover:bg-foreground/85 dark:hover:bg-foreground/90"17 )}18 onClick={() => {19 setText((current) => (current === "Continue" ? "Confirm" : "Continue"));20 }}21 type="button"22 >23 <TextMorph as="span">{text}</TextMorph>24 </button>25 );26}
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 |
