Ice Freeze
Lock button with ice spreading, snowflakes, frost covering, and lock icon freezing animation
Ice Freeze
by FreeCsStyles Dev's
AnimatedStorybook
🌐HTML/CSS🎨Tailwind⚛️React💚Vue🅰️Angular🔥Svelte☁️LWC
#ice#freeze#snow#lock#frost#winter
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/ice-freeze.
<iframe src="/embed/ice-freeze" sandbox="allow-scripts" loading="lazy" title="Ice Freeze" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Ice Freeze, 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-ice-freeze"><span class="icon">🔒</span><span class="text">Lock</span><div class="snowflakes"></div></button>CSS
.btn-ice-freeze{width:180px;height:60px;border-radius:12px;border:none;background:linear-gradient(135deg,#60a5fa,#3b82f6);color:#fff;font-size:16px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;transition:all .4s;font-family:system-ui,sans-serif;z-index:1}.btn-ice-freeze::before{content:'';position:absolute;inset:0;background:linear-gradient(135deg,#e0f2fe,#bae6fd);opacity:0;transition:opacity .8s;z-index:-1}.btn-ice-freeze .icon,.btn-ice-freeze .text{position:relative;z-index:2;transition:all .3s}.btn-ice-freeze .snowflakes{position:absolute;inset:0;pointer-events:none;z-index:3}.btn-ice-freeze .snowflakes::before,.btn-ice-freeze .snowflakes::after{content:'❄';position:absolute;font-size:12px;opacity:0;color:#fff;text-shadow:0 0 4px rgba(255,255,255,.8)}.btn-ice-freeze .snowflakes::before{top:-20px;left:20%;animation:snowfall1 2s ease-in-out infinite}.btn-ice-freeze .snowflakes::after{top:-20px;right:25%;animation:snowfall2 2.5s ease-in-out infinite .3s}.btn-ice-freeze.is-freezing::before{opacity:1}.btn-ice-freeze.is-freezing .icon{animation:ice-shake .6s ease-in-out;transform:scale(1.2)}.btn-ice-freeze.is-freezing .text{opacity:0;transform:translateY(-10px)}.btn-ice-freeze.is-frozen{background:linear-gradient(135deg,#93c5fd,#60a5fa);box-shadow:0 0 30px rgba(96,165,250,.5),inset 0 0 20px rgba(255,255,255,.3);border:2px solid rgba(255,255,255,.5)}.btn-ice-freeze.is-frozen::before{opacity:1}.btn-ice-freeze.is-frozen .icon{animation:ice-shake .6s ease-in-out}.btn-ice-freeze.is-frozen .snowflakes::before,.btn-ice-freeze.is-frozen .snowflakes::after{animation:snowfall1 2s ease-in-out infinite,snowfall2 2.5s ease-in-out infinite .3s}.btn-ice-freeze .frost-overlay{position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='20' cy='20' r='15' fill='%23ffffff' opacity='.1'/%3E%3Ccircle cx='80' cy='30' r='10' fill='%23ffffff' opacity='.15'/%3E%3Ccircle cx='50' cy='80' r='20' fill='%23ffffff' opacity='.1'/%3E%3C/svg%3E");opacity:0;transition:opacity .6s;z-index:1}.btn-ice-freeze.is-freezing .frost-overlay,.btn-ice-freeze.is-frozen .frost-overlay{opacity:1}@keyframes snowfall1{0%{top:-20px;left:20%;opacity:0}20%{opacity:1}80%{opacity:1}100%{top:100%;left:30%;opacity:0}}@keyframes snowfall2{0%{top:-20px;right:25%;opacity:0}20%{opacity:1}80%{opacity:1}100%{top:100%;right:35%;opacity:0}}@keyframes ice-shake{0%,100%{transform:scale(1.2) rotate(0deg)}25%{transform:scale(1.2) rotate(-5deg)}75%{transform:scale(1.2) rotate(5deg)}}Tailwind CSS
<button class="relative w-[180px] h-[60px] rounded-xl bg-gradient-to-br from-blue-400 to-blue-500 text-white font-bold text-base flex items-center justify-center gap-2 overflow-hidden transition-all duration-300 hover:shadow-lg hover:shadow-blue-500/50"><span class="relative z-10">🔒 Lock</span></button>React
import { useState } from 'react';
export function IceFreezeButton() {
const [phase, setPhase] = useState('idle');
const handleClick = () => {
if (phase !== 'idle') return;
setPhase('freezing');
setTimeout(() => setPhase('frozen'), 1200);
setTimeout(() => setPhase('idle'), 4000);
};
const bgClass = phase === 'frozen'
? 'linear-gradient(135deg, #93c5fd, #60a5fa)'
: 'linear-gradient(135deg, #60a5fa, #3b82f6)';
return (
<button onClick={handleClick} disabled={phase !== 'idle'}
style={{
width: 180, height: 60, borderRadius: 12, border: phase === 'frozen' ? '2px solid rgba(255,255,255,0.5)' : 'none',
background: bgClass, color: '#fff', fontSize: 16, fontWeight: 'bold',
cursor: 'pointer', position: 'relative', display: 'flex',
alignItems: 'center', justifyContent: 'center', gap: 8,
overflow: 'hidden', fontFamily: 'system-ui,sans-serif',
boxShadow: phase === 'frozen' ? '0 0 30px rgba(96,165,250,0.5), inset 0 0 20px rgba(255,255,255,0.3)' : 'none',
transition: 'all 0.4s'
}}>
<span style={{ position: 'relative', zIndex: 10 }}>
{phase === 'idle' ? '🔒 Lock' : phase === 'frozen' ? '🔓 Unlocked' : '❄️'}
</span>
{phase !== 'idle' && [
<span key="s1" style={{ position: 'absolute', top: '-20px', left: '20%', fontSize: 12, animation: 'snowfall1 2s ease-in-out infinite', zIndex: 20 }}>❄</span>,
<span key="s2" style={{ position: 'absolute', top: '-20px', right: '25%', fontSize: 12, animation: 'snowfall2 2.5s ease-in-out infinite 0.3s', zIndex: 20 }}>❄</span>
]}
</button>
);
}Vue
<template>
<button class="btn-ice-freeze" :class="phaseClass" @click="handleClick" :disabled="phase !== 'idle'">
<span class="icon">{{ phase === 'idle' ? '🔒' : phase === 'frozen' ? '🔓' : '❄️' }}</span>
<span class="text">{{ phase === 'idle' ? 'Lock' : phase === 'frozen' ? 'Unlocked' : '' }}</span>
<div class="frost-overlay"></div>
</button>
</template>
<script setup>
import { ref, computed } from 'vue';
const phase = ref('idle');
const phaseClass = computed(() => `is-${phase.value}`);
function handleClick() {
if (phase.value !== 'idle') return;
phase.value = 'freezing';
setTimeout(() => phase.value = 'frozen', 1200);
setTimeout(() => phase.value = 'idle', 4000);
}
</script>Svelte
<script>
let phase = 'idle';
function handleClick() {
if (phase !== 'idle') return;
phase = 'freezing';
setTimeout(() => phase = 'frozen', 1200);
setTimeout(() => phase = 'idle', 4000);
}
</script>
<button class="btn-ice-freeze" class:is-frozen={phase==='frozen'} on:click={handleClick} disabled={phase !== 'idle'}>
<span>{phase === 'idle' ? '🔒 Lock' : phase === 'frozen' ? '🔓 Unlocked' : '❄️'}</span>
</button>Angular
import { Component } from '@angular/core';
@Component({
selector: 'app-ice-freeze-button',
template: `<button class="btn-ice-freeze" [class.is-freezing]="phase==='freezing'" [class.is-frozen]="phase==='frozen'" (click)="handleClick()" [disabled]="phase!=='idle'"><span>{{ phase==='idle' ? '🔒 Lock' : phase==='frozen' ? '🔓 Unlocked' : '❄️' }}</span><div class="frost-overlay"></div></button>`,
styles: [`.btn-ice-freeze{width:180px;height:60px;border-radius:12px;border:none;background:linear-gradient(135deg,#60a5fa,#3b82f6);color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;transition:all .4s}.btn-ice-freeze.is-frozen{box-shadow:0 0 30px rgba(96,165,250,.5),inset 0 0 20px rgba(255,255,255,.3);border:2px solid rgba(255,255,255,.5)}`]
})
export class IceFreezeButtonComponent {
phase = 'idle';
handleClick() {
if (this.phase !== 'idle') return;
this.phase = 'freezing';
setTimeout(() => this.phase = 'frozen', 1200);
setTimeout(() => this.phase = 'idle', 4000);
}
}LWC — HTML template
<template><button class="btn-ice-freeze" onclick={handleClick} disabled={disabled}><span>{label}</span></button></template>LWC — JavaScript
import { LightningElement } from 'lwc';
export default class IceFreezeButton extends LightningElement {
phase = 'idle';
get disabled() { return this.phase !== 'idle'; }
get label() { return this.phase === 'idle' ? '🔒 Lock' : this.phase === 'frozen' ? '🔓 Unlocked' : '❄️'; }
handleClick() {
if (this.phase !== 'idle') return;
this.phase = 'freezing';
setTimeout(() => { this.phase = 'frozen'; }, 1200);
setTimeout(() => { this.phase = 'idle'; }, 4000);
}
}LWC — CSS
.btn-ice-freeze{width:180px;height:60px;border-radius:12px;border:none;background:linear-gradient(135deg,#60a5fa,#3b82f6);color:#fff;font-size:16px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;overflow:hidden;transition:all .4s}.btn-ice-freeze.is-frozen{box-shadow:0 0 30px rgba(96,165,250,.5),inset 0 0 20px rgba(255,255,255,.3);border:2px solid rgba(255,255,255,.5)}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 Ice Freeze fits
- Security Actions
- Lock UI
- Protected Content
- Authentication
Interaction states & animations
- Ice Spread
- Snowflakes
- Frost Cover
- Freeze
Topics
- #ice
- #freeze
- #snow
- #lock
- #frost
- #winter
Accessibility notes
Animation is decorative. Button text remains readable. Respect reduced-motion preference.
Browser support
- All modern browsers