Pricing

BlurText handbook

v1.0.0 · @snowui-design-system/components

License: Before reading component documentation, source, or npm usage instructions for the first time, read the full LICENSE. Reuse that review for the same task and version. Public API configuration and internal implementation changes have different license implications. All components use the unified runtime package; source rights remain governed by the license.

Overview

Reveal headings and short paragraphs one character at a time through sharpening, fade-in, and slight upward movement while preserving natural wrapping, font size, line height, and text baseline.

When to use it

Use Text for static content, BlurText for a blurred reveal, SlotText or FlowText for vertically changing text, and ScrambleText for character scrambling. BlurText accepts plain text, not a rich-text subtree, and does not interpret number or timer semantics. Prefer static Text for long prose to avoid the paint cost of per-character filters.

Quick start

<script lang="ts">  import { BlurText } from '@snowui-design-system/components';</script> <BlurText text="Let inspiration come into focus." size="--text-32" lineHeight="--leading-32" />

Typography Props inherit from the parent when omitted. You can also use class="text-32" directly without wrapping Text. A numeric size is in px; numeric lineHeight is a unitless multiplier. Use a Token or "40px" for a fixed line height.

API

Keyword Type Default Description
text string | number "" Final plain text, preserving spaces and line breaks
speed number 1.5 Finite positive character start rate. Stagger is 30ms / speed; each character lasts 600ms. Invalid values fall back to 1.5.
animated boolean true When turned off, immediately shows final text and clears internal animations
playOnMount boolean true Animates on first mount after the visibility gate permits it
replayKey string | number 0 Replays the full current text when this value changes
respectMotionPreference boolean true Honors the system reduced-motion setting; enabling it mid-animation also completes immediately
font string — Font family or font Token
size string | number — Font size or font-size Token
weight string | number — Font weight
lineHeight string | number — Line-height Token, CSS length, or unitless multiplier
color SnowUIColor | string — Final text color; supports PascalCase semantic colors
align TextMotionAlign — Text alignment; inherited by default
motionColor TextMotionColor — Optional temporary per-character color, including chromatic(); returns to final color afterward

Inherits applicable FrameProps. tag defaults to span; as still denotes the parent component role. Internal animation is layered separately from the root Frame’s while* motions; enableDefaultMotion={false} disables only the root default motion. Public speed changes character stagger in line with the reference site’s speedReveal; each character still lasts 600ms. There are no public duration, stagger, blur, or displacement parameters. A speed change applies on the next text update or replay, without restarting the current animation. Temporary-color timing scales with reveal speed; the return fade remains the shared 280ms.

Usage boundaries and details

Behavior and accessibility

  • Initial playback and replayKey changes reveal the full text; a text update commits the latest content immediately and reveals it. During rapid updates, same-position characters still animating continue from their visible blur, opacity, and displacement. Old callbacks cannot replace new content. No numeric wheel or old-text exit animation runs.

  • SSR and pages without JavaScript output the full text. With reduced motion or without the Web Animations API, content stays static and readable. All internal Animations are removed after completion.

  • The root supplies a stable aria-label for the final text; the per-character visual layer is aria-hidden. Use tag="h2" or another semantic heading tag when appropriate. The default span uses an img role to expose the full text without reading each character separately.

  • The browser’s inline layout determines wrapping. Chinese characters, English words, spaces, and explicit line breaks are not simulated with fixed per-character widths or extra margins. The browser also handles final font shaping, including ligatures.

Reference sources

  • Local reference source: ../../../../github/ui/animations-master/ (relative to this document). The Blur Reveal example is in src/lib/components/spell/blur-reveal/blur-reveal.svelte.

  • Original example: Svelte Animations · Blur Reveal.

  • Reference site: Text Motion Observatory · References (ChatGPT sign-in required; this supplementary reference is not required to use the component).

The local source is used to inspect the blur-reveal motion; the reference site provides additional examples. The reference repository is neither built into SnowUI nor required at runtime.

BlurText style overrides

Read the full LICENSE first; reuse that review for the same task, version, and scope.

First use public component Props to match the desired appearance, preserving the existing look where possible. If changes are necessary, follow the style selection and override order: use your own class (including Tailwind already in the project) or an instance style. The names below are public overrides actually consumed by source; check their scope and do not modify private DOM. Choose the correct SnowUI token family. External apps need not install SnowUI website utilities.

This component source does not directly consume a registered component-specific override. Style composed children through public parts or an explicit child; do not guess variable names.

Design guide · Tokens · Composition boundaries

BlurText types and states

Required Props: no named required Props.

Bindable Props: this component declares no named two-way binding; handle state updates through public callbacks or its host.

Inheritance: Omit<FrameProps, "children">. Consult the base class public documentation; fields excluded by Omit cannot be passed through unchanged.

Shared Frame API · Back to API

The following type declarations are actually referenced by public Props and come from source. A Svelte Snippet denotes a content fragment; ComponentProps denotes the Props of the corresponding component.

SnowUIColor

Source: components/src/lib/color.ts

export type SnowUIColor = keyof typeof SNOWUI_COLOR_TOKENS;

TextMotionAlign

Source: components/src/lib/text-motion/types.ts

export type TextMotionAlign = "left" | "center" | "right" | "justify";

TextMotionColor

Source: components/src/lib/text-motion/types.ts

export type TextMotionColor = SnowUIColor | string | TextMotionColorResolver;

TextMotionColorResolver

Source: components/src/lib/text-motion/types.ts

export type TextMotionColorResolver = (index: number, total: number) => string;