Hover✨ Premium

Elastic Scale

Scale(1.15) on hover with cubic-bezier(0.34, 1.56, 0.64, 1) — the element overshoots the target by ~8% before settling: a visible elastic bounce. Scale(0.95) on click via :active. No JavaScript.

CSSBezierScale

Updated

This effect is part of Effect.Labs — 840 vanilla effects, some free, some premium. Hover has 48 effects, including 5 free. Explore the category →

3 usage examples

Paint swatch picker — online configurator of a paint manufacturer — Elastic Scale example 1

① Paint swatch picker — online configurator of a paint manufacturer

WhenTen circular colour swatches (52×52 px) in a 5×2 grid; on hover each swatch grows with a slight bounce to confirm the possible selection; on click it retracts.
WhyA bounce on a colour swatch signals selectability without changing hue or adding a border: the feedback is physical, not colourist.
SettingsCircular swatches 52×52 px (border-radius 50%), scale(1.15) on hover with cubic-bezier bounce, scale(0.95) on :active click, colour via CSS variable.
'Book a table' button — gastronomic restaurant — Elastic Scale example 2

② 'Book a table' button — gastronomic restaurant

WhenCTA button centred in a restaurant's hero; on hover it grows with a bounce that physically translates the invitation to click; on click it presses in slightly.
WhyThe elastic bounce on a gastronomic booking button gives a generous, lively character consistent with the in-room experience.
SettingsButton 220×52 px, brown-amber gradient, scale(1.15) with cubic-bezier bounce 500 ms, scale(0.95) on :active 100 ms.
Artist thumbnails — music streaming platform — Elastic Scale example 3

③ Artist thumbnails — music streaming platform

WhenFour artist thumbnails in a grid; on hover each thumbnail grows with a bounce to signal it is clickable and invite discovering the artist.
WhyAn elastic enlargement on a music catalogue thumbnail conveys the enthusiasm associated with musical discovery, without colour or text animation.
SettingsThumbnails 100%×130 px, border-radius 12 px, dark gradient specific to each artist, scale(1.15) with bounce, now-playing bar at the bottom.

How it works

The .fx-0359-root root centers a .hover-box.hover-elastic block of 200 × 200 px on a #0a0a0f background. The element carries a transform .5s cubic-bezier(.34, 1.56, .64, 1) transition — this cubic Bezier curve has a control point above 1 (1.56), allowing it to overshoot the target value before coming back. The overshoot is about 8%: for scale(1.15), the element briefly reaches ~scale(1.24) before settling at 1.15.

On hover (or focus), transform: scale(1.15) triggers the bouncy transition. On click (:active), transform: scale(0.95) with a shorter transition (0.1 s) gives immediate tactile feedback. The hover-bounce + active-shrink combination simulates the physics of a soft object you touch that presses in on contact.

Measured in Chromium 151: overshoot visible (~8%), :active immediate, two copies on a page — only the hovered one animates.

Accessibility

  • Reduced motion: under prefers-reduced-motion: reduce, transition and transform are cancelled; on hover the element shows a fixed filter: brightness(1.15) — the change is visible without motion.
  • Keyboard: the element is a natively focusable <button>. The :focus-visible rule triggers the same elastic scale(1.15); an indigo outline marks the focus state.
  • Overflow: the scale enlarges the element beyond its footprint; on a tight grid, the neighbor may be obscured. Add overflow: hidden or enough padding on the parent container.
  • Click: :active makes the click physically perceptible without JavaScript. Ensure the click action is also accessible via keyboard (Enter / Space).

Browser compatibility

Pure CSS (transform: scale, cubic-bezier, transition, :active, :focus-visible, prefers-reduced-motion), no JavaScript. Measured in Chromium 151: overshoot visible, :active immediate, two independent copies. Works in all modern browsers.

Chrome 60+✓ Full (measured)
Firefox 55+✓ Full
Safari 10.1+✓ Full
Edge 79+✓ Full (Chromium engine)
Mobile iOS 10.3+✓ Full
Android Chrome 60+✓ Full (Chromium engine)

Without a cubic-bezier with overshoot, use ease-out: the scale stays smooth without a bounce. Without transition, the scale is instant but functional.

The code

HTML structure to paste into your page (the CSS + JS come with your purchase):

index.html — structure
<div class="fx-0359-root">
  <button class="hover-box hover-elastic" type="button">
    <span>…</span>
  </button>
</div>

One-time payment, no subscription — the code is yours forever

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
Bounce amplitude (CSS — cubic-bezier(.34, 1.56, .64, 1)) Second control point at 1.56 → overshoot ~8% Increase the y value of the 2nd control point: 1.7 gives ~20% overshoot; 1.2 gives a slight tremor. Reduce to 1.0 to remove the bounce.
Target scale (CSS — scale(1.15)) 15% enlargement scale(1.08) for a subtle effect; scale(1.3) for a strong one. On wide elements, 1.08–1.1 avoids overflow onto neighbors.
Click scale (CSS — :active { scale(.95) }) 5% shrink scale(.9) for a more pronounced dip; remove the :active block to disable tactile click feedback.
Duration (CSS — transition: transform .5s) 500 ms .3s makes the bounce snappier but less visible; .7s makes it bouncier and more pronounced.
Background color (CSS — background of .hover-elastic) linear-gradient(135deg, #14b8a6, #0d9488) Replace with any color or gradient. The elastic effect is independent of the background.

FAQ

The cubic Bezier curve defines the acceleration of an animation between 0 and 1. Setting a control point to y > 1 lets the animated value overshoot its final target before coming back — that is the overshoot. cubic-bezier(0.34, 1.56, 0.64, 1) means: slow start, ~8% overshoot mid-course, landing at the target value.
Yes: transform: scale visually enlarges the element without changing the layout (the flow stays intact). Add overflow: hidden to the grid container or use an explicit z-index on the hovered element to display it in front of neighbors.
Yes. Add two transition declarations: one on the element at rest (for exit) and one on :hover (for entry). For example, entry with overshoot (cubic-bezier(.34,1.56,.64,1)) and fast exit (ease-in .2s).