Refracted Text

Glass letters with an optional character lift, adjustable opening flow, customizable glass, beam and spectral colors, original font contours and a refracted beam.

Default

Pick a color and an animation preset, then move the cursor over the letters to bend the beam.

Dark previewReplay previewOpen in new tab

Colors

Color preset

Color separation

Color separation
Color intensity

Light

Animation preset
Theme
Fixed beam height
Opening flow (s)
Light cycle (s)
Refraction intensity

Entrance

Lift duration (s)
Character stagger (s)
Easing curve

Lettering

Font weight
Extra bold (%)
Font height (%)
Corner rounding (%)

Usage

Import the parts you need from the component's folder.

ts
import { RefractedText } from "@/components/fx/refracted-text";

API Reference

RefractedText

PropTypeDefaultDescription
textstring'PRO'A short word works best for large display lettering.
theme'auto' | 'light' | 'dark''dark'Dark by default, independently of the page. Choose Light for a white surface, or Auto to follow the inherited color scheme.
topColorstring'auto'CSS color for the upper glass. Auto preserves the original theme palette. The beam and edge highlights keep their lighting.
bottomColorstring'auto'CSS color for the lower glass. Auto preserves the original theme palette. Colors blend through the middle of each letter.
beamColorstring'auto'CSS color for the refracted beam and its bright highlights, independent of the glass colors. Auto preserves the original spectral light.
revealbooleantrueOn by default: lift each letter into place. Turn off to keep the text static while the original light flow plays.
liftDurationnumber1.75Total time from the first letter starting to rise until the last letter settles. Includes the character stagger.
staggernumber0.55Total delay from the first letter to the last. The lift has no opacity fade.
ease'power4.out' | 'power3.out' | 'power2.out' | 'power1.out' | 'expo.out' | 'sine.out' | 'sine.inOut' | 'none''power4.out'Curve for the upward lift of each character; the shader's light flow keeps its original timing.
beamFollowsLiftbooleanfalseOff keeps the light beam fixed in the preview while letters rise. On moves the beam with each glyph, as in the previous lift.
animateBeambooleantrueTurn off the automatic beam flow and show its settled appearance immediately. Character lift and cursor interaction remain active.
openingDurationnumber6.9One power4.out flow curve spans the whole word; it does not restart for each letter. Static flow (original) retains its continuous cycle.
durationnumber13.2Time for the light cycle. With character lift it stops after the entrance; static flow keeps cycling.
intensitynumber1.2Brightness of the white ray and its spectral color. Use Color separation to widen the existing spectral colors.
spectrumWarmColorstring'auto'CSS color for this spectral ray. Auto keeps the beam palette. Color separation controls its coverage without widening the bright core.
spectrumMiddleColorstring'auto'CSS color for this spectral ray. Auto keeps the beam palette. Color separation controls its coverage without widening the bright core.
spectrumCoolColorstring'auto'CSS color for this spectral ray. Auto keeps the beam palette. Color separation controls its coverage without widening the bright core.
dispersionnumber1Area covered by the three chosen spectral colors. Increase to spread them through the glass without widening the bright beam. Auto colors retain the original spectrum.
colorIntensitynumber1Strength of the chosen spectral colors, independent of the bright beam and Color separation coverage.
beamPositionnumber0.5Same vertical position as the cursor in Cursor moves beam: 0 is the top edge and 1 is the bottom edge.
fixedBeambooleanfalseHold the beam at the chosen height until the cursor moves it.
pausedbooleanfalseHold the automatic cycle; the cursor can still bend the ray.
cursorMovesBeambooleanfalseSteer the whole ray with the cursor. Off by default so the cursor bends it locally.
fontSizestring'400px'CSS size of the letters, constrained to the available width.
fontFamilystring''ReactDrops Square Display', 'Arial Black', sans-serif'Bundled Square Display preserves the original alphabet with a squarer uppercase O. The original Librestile face also remains available.
fontWeightnumber900Weight of the lettering.
extraBoldnumber2.25Expand the actual glyph outline with angular joins; corner rounding remains independent.
fontHeightnumber80Compress the natural height of the lettering without changing its width.
cornerRoundingnumber1Soften the glyph corners independently of Extra bold.
letterSpacingstring'normal'Uses the font's natural spacing unless you set a value.