Balloon Expand
The button inflates like a balloon. It becomes lighter, gently floats upward while stretching the page with it, then softly pops into a fully expanded layout.
Balloon Expand
by FreeCsStyles Dev's
AnimatedPlayful
🌐HTML/CSS🎨Tailwind⚛️React💚Vue🅰️Angular🔥Svelte☁️LWC
#balloon#inflate#float#pop#expand#playful#elastic#physics
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/balloon-expand.
<iframe src="/embed/balloon-expand" sandbox="allow-scripts" loading="lazy" title="Balloon Expand" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Balloon Expand, 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="btn-balloon"><span class="btn-text">Expand</span></button>CSS
.btn-balloon{width:224px;height:60px;border-radius:16px;border:none;background:linear-gradient(135deg,#f472b6,#ec4899);color:#fff;font-size:15px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:visible;font-family:system-ui,sans-serif;box-shadow:0 4px 20px rgba(236,72,153,.35)}.btn-balloon:hover{transform:scale(1.05)}.btn-balloon:active{transform:scale(.94)}.btn-text{position:relative;z-index:5}Tailwind CSS
<button class="w-56 h-[60px] rounded-2xl font-bold cursor-pointer border-none overflow-visible bg-gradient-to-br from-pink-400 to-pink-500 text-white shadow-lg hover:scale-105 active:scale-95 transition-all"><span class="relative z-10">Expand</span></button>React
import { useState } from 'react';
import { motion } from 'framer-motion';
export function BalloonExpand() {
const [phase, setPhase] = useState('normal');
const trigger = () => { if (phase !== 'normal') return; const seq = [['inflate',0],['float',700],['stretch',1300],['expand',1800],['pop',2300],['done',2500],['normal',4200]]; seq.forEach(([p,t]) => setTimeout(() => setPhase(p), t)); };
return (<motion.button onClick={trigger} style={{width:224,height:60,borderRadius:16,border:'none',background:phase==='done'?'linear-gradient(135deg,#ec4899,#f472b6)':'linear-gradient(135deg,#f472b6,#ec4899)',color:'#fff',fontSize:15,fontWeight:'bold',cursor:'pointer',fontFamily:'system-ui'}} animate={phase==='inflate'?{scale:[1,1.15,1.08]}:phase==='float'?{y:[0,-12,-8]}:phase==='stretch'?{scaleX:[1,1.3],scaleY:[1,0.85]}:phase==='expand'?{scaleX:[1.3,1.6],scaleY:[0.85,0.7]}:phase==='pop'?{scale:[1.6,0.92,1.05,1]}:{scale:1,y:0}} transition={{duration:0.45}}><span className="relative z-10">{phase==='normal'?'Expand':phase==='pop'?'Pop!':'Expanded!'}</span></motion.button>);
}Vue
<template>
<button class="btn-balloon" @click="trigger">
<span class="btn-text">{{ label }}</span>
</button>
</template>
<script setup>
import { ref, computed } from 'vue';
const phase = ref('normal');
const label = computed(() => ({normal:'Expand',pop:'Pop!','done':'Expanded!'}[phase.value]));
function trigger() { if (phase.value !== 'normal') return; const seq = [['inflate',0],['float',700],['stretch',1300],['pop',2300],['done',2500],['normal',4200]]; seq.forEach(([p,t]) => setTimeout(() => phase.value = p, t)); }
</script>Svelte
<script>
let phase = 'normal';
$: label = ({normal:'Expand',pop:'Pop!','done':'Expanded!'})[phase];
function trigger() { if (phase !== 'normal') return; const seq = [['inflate',0],['float',700],['pop',2300],['done',2500],['normal',4200]]; seq.forEach(([p,t]) => setTimeout(() => phase = p, t)); }
</script>
<button on:click={trigger}><span>{label}</span></button>Angular
import { Component } from '@angular/core';
@Component({selector:'app-balloon-expand',template:`<button class="btn-balloon" (click)="trigger()"><span>{{label}}</span></button>`,styles:[`.btn-balloon{width:224px;height:60px;border-radius:16px;border:none;background:linear-gradient(135deg,#f472b6,#ec4899);color:#fff;font-size:15px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;font-family:system-ui}`]})
export class BalloonExpandComponent { phase='normal'; get label() { return ({normal:'Expand',pop:'Pop!','done':'Expanded!'})[this.phase]; } trigger() { if(this.phase!=='normal')return; const seq=[['inflate',0],['float',700],['pop',2300],['done',2500],['normal',4200]]; seq.forEach(([p,t])=>setTimeout(()=>this.phase=p,t)); } }LWC — HTML template
<template><button onclick={trigger}><span>{label}</span></button></template>LWC — JavaScript
import { LightningElement } from 'lwc';
export default class BalloonExpand extends LightningElement { phase='normal'; get label() { return ({normal:'Expand',pop:'Pop!','done':'Expanded!'})[this.phase]; } trigger() { if(this.phase!=='normal')return; const seq=[['inflate',0],['float',700],['pop',2300],['done',2500],['normal',4200]]; seq.forEach(([p,t])=>setTimeout(()=>{this.phase=p;},t)); } }LWC — CSS
.btn-balloon{width:224px;height:60px;border-radius:16px;border:none;background:linear-gradient(135deg,#f472b6,#ec4899);color:#fff;font-size:15px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;font-family:system-ui}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 Balloon Expand fits
- Expand
- Open
- Grow
- Maximize
Interaction states & animations
- Click
- Multi-stage
- Physics
Topics
- #balloon
- #inflate
- #float
- #pop
- #expand
- #playful
- #elastic
- #physics
Accessibility notes
Animation is decorative. Button text remains readable. Respect reduced-motion preference.
Browser support
- All modern browsers