Text✨ Premium

Liquid Stretch Text

Each letter stretches like hot caramel on hover and snaps back with an elastic spring return — pure CSS, zero dependency.

CSSHoverStretch

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Text has 56 effects, including 4 free. Explore the category →

3 usage examples

Brand initial — Monumental letter — Liquid Stretch Text example 1

① Brand initial — Monumental letter

WhenOn a loading screen, an About page, or a brand wall where a single letter represents the identity — monogram, initial, or acronym — and occupies 40 to 60 % of the surface.
WhyAt this scale, each stroke of the letter is a visual space in its own right: scaleY(1.6) stretches the thicks and thins like caramel, revealing the internal geometry of the glyph. The elastic snap-back is felt across the full screen height, with no surrounding content to dilute its impact.
Settingsfont-size: 13rem, font-weight: 900, scaleY(1.6) scaleX(.75) to amplify the stretch, transition: 0.5s cubic-bezier(.34, 1.56, .64, 1), hover color #a78bfa (default violet).
Typographic poster — Full-screen display word — Liquid Stretch Text example 2

② Typographic poster — Full-screen display word

WhenOn a creative page, portfolio, or agency site where a single keyword fills the screen in display mode — the text is the decoration.
WhyAt very large scale (6–10 rem), the per-letter deformation evokes hand-crafted lettering in motion. Combined with a condensed or serif typeface, the effect is cinematic with no canvas or complex animation.
Settingsfont-size: 7rem, letter-spacing: -0.04em, scaleY(1.8) scaleX(.65), hover color #f59e0b (amber) instead of the default violet.
Main menu — Creative navigation items — Liquid Stretch Text example 3

③ Main menu — Creative navigation items

WhenOn a creative or agency site with a wide, always-visible desktop nav where items can visually «breathe» on hover.
WhyAt nav size (1.1–1.4 rem), the deformation is subtle — it distinguishes the hovered item without a background color, adding a unique kinetic signature to the nav.
Settingsfont-size: 1.2rem, font-weight: 700, scaleY(1.3) scaleX(.9) (moderate stretch), transition: 0.25s for nav-level responsiveness.

How it works

The text is split into as many <span class="char"> elements as there are characters — each holds the letter as both text content and a data-char attribute. The critical property is display: inline-block on each .char: it isolates each letter's transform from its neighbors, unlike a native inline element. The split can be done manually in HTML or via the splitChars(el) utility function exposed by the script, which reads data-text or the element's textContent.

On hover, the .kt-liquid .char:hover rule applies transform: scaleY(1.5) scaleX(.8) — the letter grows 50% taller while compressing 20% horizontally, mimicking the behavior of an incompressible fluid being pulled (caramel, taffy). Simultaneously, color shifts to #a78bfa (violet) and filter: blur(0.5px) adds a subtle optical diffusion at peak deformation.

The elastic snap-back on mouse-out is produced entirely by the CSS transition: transform 0.4s cubic-bezier(.34, 1.56, .64, 1). The Bézier curve with its 2nd control point at y = 1.56 (above 1) causes the animated value to overshoot its target on return — the letter briefly crosses scaleY(1) downward (a slight squish) before settling, producing the characteristic elastic snap. No RAF or JS physics engine is involved.

The animation is 100% CSS. The only JS responsibility is the utility function splitChars(), which is not called automatically — the HTML can pre-split chars statically, making the effect compatible with any server rendering pipeline, SSG, or CSS-in-JS setup without client-side JS execution.

Accessibility

  • prefers-reduced-motion not handled in the provided code: the CSS transition fires on all OSes without checking the system preference. To meet WCAG 2.3.3, add to your stylesheet: @media (prefers-reduced-motion: reduce) { .kt-liquid .char { transition: none; } }.
  • Text content lives in real DOM text nodes (<span> inline-block) — screen readers read the letters normally; no aria-hidden is needed on the char spans.
  • No role or aria-label is defined on the container in the base code: if the text carries semantic value (heading, label), wrap it in the appropriate semantic element (<h1>, <p>) and add an aria-label with the full text to prevent screen readers from reading letters individually.
  • The effect is triggered by CSS :hover only — no :focus equivalent is defined. Keyboard users do not see the deformation. Add .kt-liquid .char:focus { … } (or :focus-within on the parent) to cover keyboard accessibility.
  • user-select: none on .kt-text prevents text selection. Remove this rule if the text is meant to be copyable (links, page headings).

Browser compatibility

Requires CSS Transforms level 1 and CSS Transitions — native in all modern browsers since 2017. Zero JS dependency for rendering.

Chrome 57+✓ Full
Firefox 54+✓ Full
Safari 11+✓ Full
Edge 79+✓ Full
Mobile iOS✓ No native :hover
Android Chrome✓ No native :hover

Without CSS Transforms support, text displays normally with its font and color — no errors, no broken scripts. On mobile (touch, no hover), letters do not interact; a <code>touchstart</code> JS listener can simulate hover if needed.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="kt-text kt-liquid" data-text="HELLO">
  <!-- One .char span per letter — generated by splitChars(el) or pre-split -->
  <span class="char" data-char="H">H</span>
  <span class="char" data-char="E">E</span>
  <span class="char" data-char="L">L</span>
  <span class="char" data-char="L">L</span>
  <span class="char" data-char="O">O</span>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
font-size on .kt-text 2.2rem Typography size. Increase to 4–8 rem to amplify the caramel effect — it reads far more dramatically at large scale.
font-weight on .kt-text 800 Font weight. Condensed or extra-bold fonts (900) increase the contrast between normal and stretched states.
scaleY in .kt-liquid .char:hover 1.5 Vertical stretch factor on hover. 1.2 = subtle effect; 1.8–2.0 = pronounced caramel-like stretch.
scaleX in .kt-liquid .char:hover 0.8 Horizontal compression on hover. Drop to 0.6 to accentuate liquid incompressibility; raise to 0.95 for vertical-only stretch.
color in .kt-liquid .char:hover #a78bfa Letter color at peak deformation. Replace with your brand color or use currentColor to inherit from the parent.
blur() in filter: blur() of .kt-liquid .char:hover 0.5px Optical diffusion on hover. Set to 0 to disable; 1–2 px for a softer, more liquid look.
transition-duration in .kt-liquid .char 0.4s Duration of the elastic return. 0.2–0.25 s = snappy; 0.6–0.8 s = slow, viscous bounce.
cubic-bezier(.34, 1.56, .64, 1) in transition .34, 1.56, .64, 1 Spring curve. Increase the 2nd parameter (1.56 →) for a more pronounced overshoot; bring it close to 1.0 for a return without spring.

FAQ

Yes — the deformation and elastic snap-back are 100% CSS (:hover + transition). The JS only exposes splitChars(el), a utility function not called automatically. If the HTML already contains the <span class="char"> elements, no JS runs.
The cubic-bezier(.34, 1.56, .64, 1) curve in the transition property controls the overshoot. The 2nd parameter (1.56) exceeds 1.0 — that's what produces the snap. Raise it (e.g. 2.0) for a bouncier spring, bring it down to 1.0 for a return with no bounce. Preview the curve at cubic-bezier.com.
Yes — the effect is purely CSS; it applies automatically to any element with classes kt-text kt-liquid whose children have the class char. Call splitChars(el) on each container for dynamic splitting; instances are fully independent.