Jelly Bounce
The entire button behaves like jelly — squashes on press, stretches on release, bounces with overshoot, then settles naturally with spring physics
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/jelly-bounce-button.
<iframe src="/embed/jelly-bounce-button" sandbox="allow-scripts" loading="lazy" title="Jelly Bounce" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Jelly Bounce, or grab a framework-specific implementation. The HTML and CSS variants are self-contained; framework variants assume that framework's project setup.
HTML
<button class="jelly-btn"><span class="jelly-label">🫧 Click</span><div class="jelly-highlight"></div></button>CSS
.jelly-btn{position:relative;width:180px;height:56px;border:none;border-radius:16px;background:linear-gradient(135deg,#ec4899,#db2777);color:#fff;font-size:15px;font-weight:700;cursor:pointer;overflow:hidden;font-family:system-ui,sans-serif;transform-origin:center center;will-change:transform;transition:background .3s}.jelly-btn:hover{background:linear-gradient(135deg,#f472b6,#ec4899);box-shadow:0 8px 30px rgba(236,72,153,.4)}.jelly-btn:active{animation:jelly-squash .15s ease}.jelly-btn.is-squashing{animation:jelly-squash .15s ease}.jelly-btn.is-stretching{animation:jelly-stretch .2s ease .15s}.jelly-btn.is-bouncing{animation:jelly-bounce .6s cubic-bezier(.34,1.56,.64,1) .35s}.jelly-btn.is-settling{animation:jelly-settle .4s cubic-bezier(.25,.46,.45,.94) .95s}.jelly-btn.is-idle{animation:jelly-idle-bob 3s ease-in-out infinite}.jelly-highlight{position:absolute;top:6px;left:50%;transform:translateX(-50%);width:60%;height:4px;background:rgba(255,255,255,.3);border-radius:2px;pointer-events:none;opacity:0;transition:opacity .3s}.jelly-btn:hover .jelly-highlight{opacity:1}@keyframes jelly-squash{0%{transform:scale(1,1)}30%{transform:scale(1.15,.8)}60%{transform:scale(.95,1.05)}100%{transform:scale(1,1)}}@keyframes jelly-stretch{0%{transform:scale(1,1)}40%{transform:scale(.85,1.15)}70%{transform:scale(1.05,.95)}100%{transform:scale(1,1)}}@keyframes jelly-bounce{0%{transform:translateY(0) scaleY(1)}20%{transform:translateY(-8px) scaleY(1.06) scaleX(.94)}40%{transform:translateY(0) scaleY(.94) scaleX(1.06)}60%{transform:translateY(-4px) scaleY(1.03) scaleX(.97)}80%{transform:translateY(0) scaleY(.98) scaleX(1.02)}100%{transform:translateY(0) scaleY(1) scaleX(1)}}@keyframes jelly-settle{0%{transform:scale(1.02,.98)}50%{transform:scale(.99,1.01)}100%{transform:scale(1,1)}}@keyframes jelly-idle-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}Tailwind CSS
<button class="relative w-[180px] h-[56px] rounded-2xl bg-gradient-to-br from-pink-500 to-pink-600 text-white text-[15px] font-bold cursor-pointer overflow-hidden transition-all hover:shadow-lg active:scale-95 font-sans" style="animation: jelly-idle-bob 3s ease-in-out infinite;"><span class="relative z-10">🫧 Click</span></button>React
import { useState, useCallback } from 'react';
export function JellyBounceButton() {
const [phase, setPhase] = useState('idle');
const handleClick = useCallback(() => {
if (phase !== 'idle') return;
setPhase('squashing');
setTimeout(() => setPhase('stretching'), 150);
setTimeout(() => setPhase('bouncing'), 350);
setTimeout(() => setPhase('settling'), 950);
setTimeout(() => setPhase('idle'), 1400);
}, [phase]);
const phaseClass = phase === 'idle' ? 'jelly-btn' : `jelly-btn is-${phase}`;
return (
<button onClick={handleClick} disabled={phase !== 'idle'} className={phaseClass} style={{position:'relative',width:180,height:56,border:'none',borderRadius:16,background:'linear-gradient(135deg,#ec4899,#db2777)',color:'#fff',fontSize:15,fontWeight:700,cursor:'pointer',overflow:'hidden',fontFamily:'system-ui,sans-serif',transformOrigin:'center',transition:'background 0.3s'}}>
<span className="jelly-label">🫧 Click</span>
<div className="jelly-highlight"></div>
</button>
);
}Vue
<template>
<button
:class="['jelly-btn', phase !== 'idle' ? 'is-' + phase : '']"
@click="handleClick"
:disabled="phase !== 'idle'"
>
<span class="jelly-label">🫧 Click</span>
<div class="jelly-highlight"></div>
</button>
</template>
<script setup>
import { ref } from 'vue';
const phase = ref('idle');
function handleClick() {
if (phase.value !== 'idle') return;
phase.value = 'squashing';
setTimeout(() => phase.value = 'stretching', 150);
setTimeout(() => phase.value = 'bouncing', 350);
setTimeout(() => phase.value = 'settling', 950);
setTimeout(() => phase.value = 'idle', 1400);
}
</script>Svelte
<script>
let phase = 'idle';
function handleClick() {
if (phase !== 'idle') return;
phase = 'squashing';
setTimeout(() => phase = 'stretching', 150);
setTimeout(() => phase = 'bouncing', 350);
setTimeout(() => phase = 'settling', 950);
setTimeout(() => phase = 'idle', 1400);
}
</script>
<button class="jelly-btn" class:is-idle={phase === 'idle'} on:click={handleClick} disabled={phase !== 'idle'}>
<span class="jelly-label">🫧 Click</span>
<div class="jelly-highlight"></div>
</button>Angular
import { Component } from '@angular/core';
@Component({
selector: 'app-jelly-bounce-button',
template: `<button [class]="'jelly-btn' + (phase !== 'idle' ? ' is-' + phase : '')" (click)="handleClick()" [disabled]="phase !== 'idle'">
<span class="jelly-label">🫧 Click</span>
<div class="jelly-highlight"></div>
</button>`,
styles: [`.jelly-btn{position:relative;width:180px;height:56px;border:none;border-radius:16px;background:linear-gradient(135deg,#ec4899,#db2777);color:#fff;font-size:15px;font-weight:700;cursor:pointer;overflow:hidden;transform-origin:center;transition:background .3s}.jelly-btn:hover{background:linear-gradient(135deg,#f472b6,#ec4899);box-shadow:0 8px 30px rgba(236,72,153,.4)}.jelly-highlight{position:absolute;top:6px;left:50%;transform:translateX(-50%);width:60%;height:4px;background:rgba(255,255,255,.3);border-radius:2px;pointer-events:none;opacity:0;transition:opacity .3s}.jelly-btn:hover .jelly-highlight{opacity:1}`]
})
export class JellyBounceButtonComponent {
phase = 'idle';
handleClick() {
if (this.phase !== 'idle') return;
this.phase = 'squashing';
setTimeout(() => this.phase = 'stretching', 150);
setTimeout(() => this.phase = 'bouncing', 350);
setTimeout(() => this.phase = 'settling', 950);
setTimeout(() => this.phase = 'idle', 1400);
}
}LWC — HTML template
<template><button class="jelly-btn" onclick={handleClick} disabled={disabled}><span class="jelly-label">🫧 Click</span><div class="jelly-highlight"></div></button></template>LWC — JavaScript
import { LightningElement } from 'lwc';
export default class JellyBounceButton extends LightningElement {
phase = 'idle';
get disabled() { return this.phase !== 'idle'; }
handleClick() {
if (this.phase !== 'idle') return;
this.phase = 'squashing';
setTimeout(() => this.phase = 'stretching', 150);
setTimeout(() => this.phase = 'bouncing', 350);
setTimeout(() => this.phase = 'settling', 950);
setTimeout(() => this.phase = 'idle', 1400);
}
}LWC — CSS
.jelly-btn{position:relative;width:180px;height:56px;border:none;border-radius:16px;background:linear-gradient(135deg,#ec4899,#db2777);color:#fff;font-size:15px;font-weight:700;cursor:pointer;overflow:hidden;font-family:system-ui,sans-serif;transform-origin:center;transition:background .3s}.jelly-btn:hover{background:linear-gradient(135deg,#f472b6,#ec4899);box-shadow:0 8px 30px rgba(236,72,153,.4)}.jelly-highlight{position:absolute;top:6px;left:50%;transform:translateX(-50%);width:60%;height:4px;background:rgba(255,255,255,.3);border-radius:2px;pointer-events:none;opacity:0;transition:opacity .3s}.jelly-btn:hover .jelly-highlight{opacity:1}LWC — Configuration
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>59.0</apiVersion>
<isExposed>true</isExposed>
<targets><target>lightning__AppPage</target><target>lightning__RecordPage</target><target>lightning__HomePage</target></targets>
</LightningComponentBundle>Where Jelly Bounce fits
- Playful UI
- Games
- Kids Apps
- Fun Interactions
Interaction states & animations
- Jelly Squash
- Stretch
- Bounce
- Spring Settle
Topics
- #jelly
- #bounce
- #squash
- #stretch
- #spring
- #animation
- #storybook
- #physics
Accessibility notes
Animation is decorative. Button text remains readable. Respect reduced-motion preference.
Browser support
- All modern browsers