CSS Animations · Interactive

Gestures and layout.

Editorial photo of a model in an oversized navy wrap-style pantsuit with a loosened tie, seated with tan lace-up heeled boots Drag me

Gestures & physics

Draggable · momentum — 2

Portrait of a man in a tan blazer and cream sweater with sunglasses tucked into the collar, standing outdoors
data-kui="drag-inertia" — flick and release
Model in a pink floral blouse and matching trousers blowing a bubblegum bubble, seated cross-legged on a pink pedestal against a pink background
data-kui="throwable" — flick it away

Draggable · return springs — 3

Profile portrait of a model in a glossy grey rounded helmet with an integrated mechanical ear piece, gloved hand raised to the chin
data-kui="elastic-pull" — soft snap back
Portrait of a man in a bold navy-and-cream swirl-print turtleneck sweater on a city street
data-kui="rubber-band" — wider give
Profile portrait of a model wearing a glowing translucent sculptural headpiece shaped like a shell, dusk cityscape behind
data-kui="snap-back" — stiff spring

Draggable · axis — 3

Close-up portrait of a model in a rhinestone-mesh hood and turtleneck, red lipstick and a nose ring
data-kui="drag" — drag it anywhere
Portrait of a model with white hair wearing a glowing red LED visor and white high-collar jacket against a dark red background
data-kui="drag-x" — horizontal only
Close-up portrait of a model in an all-white hooded outfit and mirrored wraparound sunglasses with bold red lipstick
data-kui="drag-y" — vertical only

Swipeable — 2

Close-up portrait of a model with pale features and metallic wire choker rings, wearing reflective black visor sunglasses
data-kui="swipe" — swipe any direction
Portrait of a model in a strapless navy-and-cream gown printed with abstract Picasso-style faces, beside a matching painted vase
data-kui="swipe-x" — left or right only

Pressable — 1

Close-up portrait of a model in a golden dome-shaped reflective visor catching warm sunlight, nose and lips visible below
data-kui="long-press" — press and hold

Magnetic — 2

Beauty portrait of a face wrapped in a black headwrap down to the nose, gold drop earrings, matte black lipstick
data-kui="magnetic" — move your pointer near
Profile portrait of a model in a glossy black full-face helmet with a reflective visor and matching black leather jacket
data-kui="magnetic-snap" — stronger pull

Layout & FLIP

flip-filter — 1

flip-reorder — 1

Click any card — it jumps to the front and the rest reflow around it.

Profile portrait of a model in a glossy grey rounded helmet with an integrated mechanical ear piece, gloved hand raised to the chin
click to bring forward
Portrait of a model in a strapless navy-and-cream gown printed with abstract Picasso-style faces, beside a matching painted vase
click to bring forward
Close-up portrait of a model in a golden dome-shaped reflective visor catching warm sunlight, nose and lips visible below
click to bring forward
Portrait of a man in a tan blazer and cream sweater with sunglasses tucked into the collar, standing outdoors
click to bring forward

flip-sort — 1

Profile portrait of a model in a glossy black full-face helmet with a reflective visor and matching black leather jacket
black helmet
Model in a pink floral blouse and matching trousers blowing a bubblegum bubble, seated cross-legged on a pink pedestal against a pink background
pink bubblegum
Close-up portrait of a model in a rhinestone-mesh hood and turtleneck, red lipstick and a nose ring
silver mesh
Portrait of a model with white hair wearing a glowing red LED visor and white high-collar jacket against a dark red background
red visor

flip-shuffle — 1

Close-up portrait of a model in an all-white hooded outfit and mirrored wraparound sunglasses with bold red lipstick
data-kui="flip-shuffle"
Portrait of a man in a tan blazer and cream sweater with sunglasses tucked into the collar, standing outdoors
data-kui="flip-shuffle"
Portrait of a man in a bold navy-and-cream swirl-print turtleneck sweater on a city street
data-kui="flip-shuffle"
Profile portrait of a model wearing a glowing translucent sculptural headpiece shaped like a shell, dusk cityscape behind
data-kui="flip-shuffle"

grid-to-list — 1

Close-up portrait of a model with pale features and metallic wire choker rings, wearing reflective black visor sunglasses
data-kui="grid-to-list"
Profile portrait of a model in a glossy black full-face helmet with a reflective visor and matching black leather jacket
data-kui="grid-to-list"
Profile portrait of a model in a glossy grey rounded helmet with an integrated mechanical ear piece, gloved hand raised to the chin
data-kui="grid-to-list"
Close-up portrait of a model in a golden dome-shaped reflective visor catching warm sunlight, nose and lips visible below
data-kui="grid-to-list"

masonry-reflow — 1

Abstract beauty portrait of a face rendered in liquid gold silk, fabric swirled around the head
classic
Profile portrait of a model wearing a glowing translucent sculptural headpiece shaped like a shell, dusk cityscape behind
futuristic
Beauty portrait of a matte white face with molten liquid gold dripping over the eyes and mouth, bold red lips
futuristic
Close-up portrait of a model in an all-white hooded outfit and mirrored wraparound sunglasses with bold red lipstick
futuristic
Portrait of a model with white hair wearing a glowing red LED visor and white high-collar jacket against a dark red background
futuristic
Portrait of a model in a strapless navy-and-cream gown printed with abstract Picasso-style faces, beside a matching painted vase
classic

expand-to-modal — 1

Click a card to expand it in place; the rest of the grid reflows around it.

accordion-height & tab-indicator-slide — 2

Same primitive (draggable with return:true), different spring stiffness. elastic-pull ships a soft return, rubber-band widens the resistance before it lets go, and snap-back uses a stiff spring (stiffness:260) that whips home fast.
swipeable and pressable only own a state channel — they publish data-kui-swipe / data-kui-pressed attributes and leave the visual response to ordinary CSS, same as the swipe badge and press outline on the cards above.
A MutationObserver on the container watching childList, subtree, and the hidden attribute. Reordering or hiding children fires it automatically — a bare CSS class change on the container (like grid-to-list's view toggle) does not, so this page re-appends the children after a class swap to give the observer something to notice.

Even columns, fixed aspect ratio — the entrance-matrix and filter demos above all use this.

Programmatic API

The same registry, driven from JavaScript. anim.play() accepts a selector, an Element, or any iterable.