uibrik

Scatter Text

Preview

Customize

Display2.0s
Wave speed1.25
Shimmer speed1.4
Shimmer width120px
Particles3000
Scatter min23px
Scatter max60px

Usage

import { ShatterText } from "@/components/uibrik/scatter-text/shatter-text";

<ShatterText />

Installation

npx shadcn@latest add https://uibrik.com/r/scatter-text.json
Adds the files to components/uibrik/scatter-text. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/scatter-text.

Props

ShatterText
phrases
Type string[]
["Generating prompt...","Optimizing weights...","Deploying model...","Analyzing context...","Processing input...","Understanding intent...","Retrieving context...","Running inference...","Evaluating response..."]
Phrases to cycle through.
displayDuration
Type number
2
Seconds each phrase holds.
waveSpeed
Type number
1.25
Speed of the scatter wave.
shimmerSpeed
Type number
1.4
Speed of the shimmer sweep.
shimmerWidth
Type number
120
Width of the shimmer beam.
particleCount
Type number
3000
Particles sampled across the text.
scatterRadius
Type [number, number]
[20, 50]
Min and max scatter distance in px.
color
Type string
–
Base text colour; inherits from className when omitted.
flightColor
Type string
–
Particle colour while scattered.
glowColor
Type string
–
Colour at the peak of the wave.
shimmerColor
Type string
–
Shimmer highlight colour.
textAlign
Type "center" | "left" | "right"
"center"
Alignment inside the canvas.
trigger
Type number
–
When set, each change advances the phrase instead of a timer.
shimmer
Type boolean
true
Run the shimmer sweep while a phrase rests.
className
Type string
–
Container classes; colour, size, weight and family are read from them.