soft

Interaction FX

Pointer-driven effects, physical motion and decorative backgrounds. Springy, opt-in via a class or data attribute, and calm under reduced motion.

Magnet and sticky pull

Any element drifts toward the pointer: data-sf-magnet="0.4" with data-sf-magnet-radius. data-sf-sticky pulls the element and its .sf-sticky__inner while hovered.

Strong pull

3D tilt card with glare

data-sf-tilt="14". Add data-sf-glare="off" to drop the glare. Children with .sf-tilt__lift pop out in 3D.

Weekly focus

Hover and move. The card follows you, then springs back.

No glare

Subtle 8 degree tilt.

Spotlight card

data-sf-spotlight lights the surface and border around the cursor. Wrap cards in data-sf-spotlight-group to light the whole grid at once.

Focus

Deep work blocks.

Notes

Quiet, linked, fast.

Share

One link, no fuss.

Glow and animated border

Root class .sf-glow (conic rotating border plus blurred glow). Modifiers: --mono, --soft (glow only), --pulse.

Colour
Mono
Soft pulse

Ripple on click

data-sf-ripple (or ="center"). Works from keyboard too.

Ripple card

Jelly press and wobble

data-sf-jelly: wobbles on hover, squashes on press, jiggles on click.

AB Badge

Press and hold

.sf-hold with data-sf-hold="1200" (ms). Fires soft:hold plus a confetti burst. Hold Space or Enter too.

Slide to confirm

.sf-slide. Drag the handle, or focus it and use arrow keys / Enter.

Slide to pay $24

Confetti variants

Soft.confetti.burst / cannon / rain / shapes / fireworks / stop, or the attribute data-sf-fx-confetti with a value of burst, cannon, rain, stars, emoji or fireworks.

Particles background

.sf-particles + data-sf-particles="60". Dots drift, connect, and flee the pointer (data-sf-repel, data-sf-link).

Move your cursor here

Sparkles

data-sf-sparkles twinkles stars around the element on hover or focus. Optional colour list.

New

Background patterns

.sf-bg-dots / -grid / -noise / -stripes with fades .sf-bg--fade-b / -t / -radial / -edge. .sf-bg-drift scrolls the pattern; --sf-fx-gap sets spacing.

Dot grid
Line grid
Noise
Stripes

Orbs and aurora

.sf-bg-orbs with four .sf-bg-orbs__orb children. CSS only. Modifiers --mono, --aurora.

Colour orbs
Mono orbs

Morphing blobs

.sf-blobby (border-radius morph) with --fast --egg --pebble --spin --grad --hover, plus an SVG path morph (SMIL).

Waves and curved dividers

.sf-wave holds three svg layers that drift. .sf-curve clips a section: --top --tilt --arc --surface.

Curve bottom
Tilt
Arc

Utility animations

.sf-anim-float / levitate / pulse / ping / wiggle / shake / heartbeat / spin. Add -fast, -slow, or .sf-anim-hover to play only on hover.

floatlevitatepulse pingwiggleshake heartbeatspinon hover

Flip card and 3D rotator

.sf-flip flips on click / Enter (--hover also on hover, --x flips vertically). .sf-rotator is a cube; add --carousel for a ring. Drag, arrows, or buttons.

Click meFront
SurpriseBack side
HoverVertical flip
HelloFrom behind
One
Two
Three
Four

Drag and drop

.sf-drag springs home with your throw velocity (data-sf-drag="free" to stay put). .sf-sortable reorders with FLIP animation; keyboard: focus an item, Space to grab, arrows to move, Space to drop.

Drag me and let go
  • Design the landing page
  • Write the copy
  • Ship it
  • Celebrate

Swipe card stack

.sf-swipestack. Throw cards with velocity, press the buttons, or use arrow keys on the stack. Emits soft:swipe.

LIKESKIPKyoto in spring7 days, slow travel
LIKESKIPLisbon by tram4 days, food first
LIKESKIPPatagonia hike10 days, big views
LIKESKIPReykjavik weekend3 days, hot springs

Magnify list

data-sf-magnify (or ="vertical") scales children by pointer distance. Also magnifies the focused child.

Pull to refresh and elastic overscroll

.sf-ptr. Pull down at the top (touch or mouse drag); rubber-bands at both ends. Emits soft:refresh with detail.done(). Button fallback: data-sf-ptr-trigger="id".

Welcome aboard
Your invoice is ready
New comment on your post
Weekly digest
Meeting moved to 3pm
Someone liked your photo

Hover-reveal cards and distortion lines

.sf-reveal: media zooms, caption slides up, icon pops. .sf-lines: bars bend toward the pointer (data-sf-lines="16").

Mountain lightOpen the story

Lens and image compare

data-sf-lens="2.5" wraps an img or inline svg. .sf-imgcompare uses a real range input, so it works with keyboard and touch.

Tiny detail lives here.Move the lens to read the small print
BeforeAfter

Fancy buttons

.sf-fx-btn with --gradient (animated), --shine (travelling border), --sweep, and monochrome --ink fill that grows from the pointer.

Theme toggle with circular reveal

data-sf-theme-toggle. Uses the View Transitions API from the click point, falls back to a fade. Remembers the choice.

Cursor trail

.sf-trail with data-sf-trail="dots|ribbon", or page-wide with Soft.cursorTrail(). Add data-sf-trail-color="accent" for the accent palette.

Dots
Ribbon
Accent ribbon

Gravity sandbox

Opt-in physics: .sf-gravity with .sf-gravity__item children. Drop them, then grab and throw. Reduced motion stacks them instantly.

Everythingfallseventuallysolet itbouncea little

Emoji reaction burst

data-sf-react="๐Ÿ‘ โค๏ธ ๐Ÿ”ฅ" floats emojis up from the click and bumps .sf-react__count. Also Soft.react(el, emojis).

Micro-interactions kit

.sf-pop-check (checkbox pop), .sf-jswitch (jelly toggle), .sf-like with data-sf-like (heart with particles).

Screen shake on error

Soft.shake(el, { amplitude: 8, duration: 500 }) (also buzzes on phones). Declarative: data-sf-shake on a button, or data-sf-shake-invalid on a form to shake when validation fails.