BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ui-beats/text-writer

Text Writer

ui-beats/text-writer
FreeComponent

The TextWriter component creates a typing animation effect for text, where characters appear one by one to mimic real-time typing.

Install it

npx shadcn@latest add https://uibeats.com/r/text-writer.json

Source

components/demo/text/text-writer.tsxuibeats.com/r/text-writer.json
1"use client";
2import React, { useEffect, useRef, useState } from "react";
3import { Easing, motion } from "motion/react";
4
5interface TextWriterProps {
6 text: string;
7 delay?: number;
8 className?: string;
9 cursorColor?: string;
10 cursorWidth?: string;
11 cursorStyle?: string;
12 eraseOnComplete?: boolean;
13 eraseDelay?: number;
14 loop?: boolean;
15}
16
17const TextWriter: React.FC<TextWriterProps> = ({
18 text,
19 delay = 0.05,
20 className = "",
21 cursorColor = "#000",
22 cursorWidth = "2px",
23 cursorStyle = "solid",
24 eraseOnComplete = false,
25 eraseDelay = 2000,
26 loop = false,
27}) => {
28 const [displayText, setDisplayText] = useState("");
29 const [isWriting, setIsWriting] = useState(true);
30 const textRef = useRef<HTMLSpanElement>(null);
31 const stepEasing: Easing = (t) => Math.floor(t * 2) / 2;
32
33 useEffect(() => {
34 let timeoutId: NodeJS.Timeout;
35 let currentIndex = 0;
36
37 const writeText = () => {
38 if (currentIndex <= text.length) {
39 setDisplayText(text.slice(0, currentIndex));
40 currentIndex++;
41 timeoutId = setTimeout(writeText, delay * 1000);
42 } else {
43 setIsWriting(false);
44 if (eraseOnComplete || loop) {
45 timeoutId = setTimeout(eraseText, eraseDelay);
46 }
47 }
48 };
49
50 const eraseText = () => {
51 setIsWriting(true);
52 if (currentIndex > 0) {
53 currentIndex--;
54 setDisplayText(text.slice(0, currentIndex));
55 timeoutId = setTimeout(eraseText, delay * 1000);
56 } else {
57 if (loop) {
58 currentIndex = 0;
59 timeoutId = setTimeout(writeText, delay * 1000);
60 } else {
61 setIsWriting(false);
62 }
63 }
64 };
65
66 writeText();
67
68 return () => clearTimeout(timeoutId);
69 }, [text, delay, eraseOnComplete, eraseDelay, loop]);
70
71 return (
72 <span className={`inline-flex items-center ${className}`}>
73 <span ref={textRef}>{displayText}</span>
74 {isWriting && (
75 <motion.span
76 style={{
77 width: cursorWidth,
78 height: "1em",
79 backgroundColor: cursorColor,
80 display: "inline-block",
81 borderStyle: cursorStyle,
82 marginLeft: "1px",
83 }}
84 animate={{ opacity: [1, 0] }}
85 transition={{
86 duration: 0.8,
87 repeat: Infinity,
88 ease: stepEasing,
89 }}
90 />
91 )}
92 </span>
93 );
94};
95
96export default TextWriter;

What it pulls in

npm packages

  • motion

Files it writes

  • components/ui/text-writer.tsx

Facts

Registry
ui-beats
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

uibeats.com Raw registry item This item as JSON

More from ui-beats

All 34 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Animated Beamanimated-beamui-beatsComponentsFree1 dep
Animated Listanimated-listui-beatsComponentsFree1 dep
Border Beamborder-beamui-beatsComponentsFree1 dep
Bouncebounceui-beatsComponentsFree1 dep
Card Stackcard-stackui-beatsComponentsFree1 dep
Dockdockui-beatsComponentsFree1 dep
Fade Infade-inui-beatsComponentsFree1 dep
Fade In Unblurfade-in-unblurui-beatsComponentsFree1 dep

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex