Text Morph Input Demo
sora-ui/demo-text-morph-inputFreeComponent
Live text morph driven by a controlled input.
Install it
npx shadcn@latest add https://ui.soralabs.io.vn/r/demo-text-morph-input.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 — live morph as you type. */8export function TextMorphInput() {9 const [text, setText] = useState("Craft");1011 return (12 <div className="flex w-full max-w-sm flex-col items-center justify-end space-y-12">13 <TextMorph className="font-medium text-5xl text-foreground" live="polite">14 {text}15 </TextMorph>16 <input17 className={cn(18 "h-9 w-full rounded-lg border border-input bg-transparent p-2",19 "text-base text-foreground shadow-xs outline-none transition-colors",20 "placeholder:text-muted-foreground",21 "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50"22 )}23 onChange={(event) => setText(event.target.value)}24 placeholder="Type your text here"25 type="text"26 value={text}27 />28 </div>29 );30}3132export default TextMorphInput;
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 |
