Feedback

Text reveal.

A restrained entrance that preserves the text and its reading order.

LIVE PREVIEWTry it. It works.

Install the source

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/text-reveal.json

Registry setup · Examples · API and behavior · Open the playground

COMPLETE EXAMPLES

Use it in context.

Each example includes its imports, data and state. The preview runs that same source. Include the stylesheet once in your application.

A restrained heading entrance

Reveal complete words in reading order, retaining real text and a visible server-rendered fallback.

Keyboard

  • The action remains a native button. Text is never replaced with a duplicate accessible label.

States covered

  • one viewport entrance
  • bounded word delays
  • explicit replay
  • live reduced motion

Install this complete example and its component dependencies.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/example-text-reveal-reading-order.json
Complete source
React / TypeScript
/*!
MIT License

Copyright (c) 2026 Jaison

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
'use client';
import '@bld8/ui/styles.css';
import {useState} from 'react';
import {Button,TextReveal} from '@bld8/ui';
export default function HeadingEntrance(){const [replay,setReplay]=useState(0);return <section><TextReveal key={replay} as="h3" text="A little room for useful details." style={{fontSize:'clamp(24px,5vw,40px)',lineHeight:1.2,maxWidth:580}}/><p>Real text stays available while a short entrance introduces it.</p><Button variant="secondary" onClick={()=>setReplay(value=>value+1)}>Replay heading entrance</Button></section>;}

Quick reference

React / TypeScript
<TextReveal as="h2" text="A useful place to begin." />

In the workspace or ZIP starter, import components from @bld8/ui and include @bld8/ui/styles.css once. Registry installations use your local bld8/ source path. Wrap overlays in UIProvider.

API & behaviour

Server-rendered text is readable before interaction. Word entrances are bounded, settle for reduced motion and never duplicate the accessible text. Longer passages render directly.

TextReveal

TextReveal public properties
PropTypeDefault
textRequiredstring—
as"p" | "h1" | "h2" | "h3" | "span" | undefined'p'
classNamestring | undefined—
delaynumber | undefined0
intervalnumber | undefined.018
styleCSSProperties | undefined—

TextRevealProps

TextRevealProps public properties
PropTypeDefault
textRequiredstring—
as"p" | "h1" | "h2" | "h3" | "span" | undefined—
classNamestring | undefined—
delaynumber | undefined—
intervalnumber | undefined—
styleCSSProperties | undefined—

Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.

Related controls

Notes to self

Test this component with real content, keyboard input and both themes. The example is a starting point; labels, error handling and behaviour still need to fit the application.