Skip to content

X Shredder Close

X unfolds into a tiny shredder, the current window becomes paper and feeds into the shredder, paper strips fall down, and the screen closes with a fade-out

X Shredder Close

by FreeCsStyles Dev's

AnimatedIndustrial
🌐🎨⚛️💚🅰️🔥☁️
#shredder#close#delete#paper#strips#industrial#x-button

Embed this component

Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/x-shredder-close.

<iframe src="/embed/x-shredder-close" sandbox="allow-scripts" loading="lazy" title="X Shredder Close" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for X Shredder Close, 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-x-shredder"><div class="shredder-body"><div class="shredder-slot"></div><div class="shredder-teeth"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div></div><div class="paper"><div class="paper-line"></div><div class="paper-line"></div><div class="paper-line short"></div></div><div class="strip-container"><div class="strip" style="--i:0"></div><div class="strip" style="--i:1"></div><div class="strip" style="--i:2"></div><div class="strip" style="--i:3"></div><div class="strip" style="--i:4"></div><div class="strip" style="--i:5"></div><div class="strip" style="--i:6"></div></div><div class="x-icon"><span class="x-line x1"></span><span class="x-line x2"></span></div><span class="btn-text">Close</span></button>
CSS
.btn-x-shredder{width:180px;height:56px;border-radius:14px;border:none;background:#1a1a2e;color:#e2e8f0;font-size:15px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;font-family:system-ui,-apple-system,sans-serif;box-shadow:0 4px 15px rgba(0,0,0,.3),inset 0 1px 0 rgba(255,255,255,.05)}.btn-x-shredder:hover{box-shadow:0 6px 20px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.08)}.btn-x-shredder .x-icon{position:absolute;display:flex;align-items:center;justify-content:center;z-index:5;transition:all .5s cubic-bezier(.68,-.55,.27,1.55)}.btn-x-shredder .x-line{position:absolute;width:20px;height:3px;background:#f43f5e;border-radius:2px;transition:all .5s cubic-bezier(.68,-.55,.27,1.55)}.btn-x-shredder .x-line.x1{transform:rotate(45deg)}.btn-x-shredder .x-line.x2{transform:rotate(-45deg)}.btn-x-shredder .shredder-body{position:absolute;width:50px;height:35px;background:linear-gradient(180deg,#475569,#334155);border-radius:4px 4px 8px 8px;opacity:0;transform:scaleY(0);transform-origin:bottom;transition:all .5s cubic-bezier(.34,1.56,.64,1);z-index:4}.btn-x-shredder .shredder-slot{position:absolute;top:-3px;left:50%;transform:translateX(-50%);width:40px;height:6px;background:#0f172a;border-radius:3px;border:1px solid #1e293b}.btn-x-shredder .shredder-teeth{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;gap:2px}.btn-x-shredder .shredder-teeth span{width:3px;height:8px;background:#94a3b8;border-radius:0 0 1px 1px}.btn-x-shredder .paper{position:absolute;top:-30px;left:50%;transform:translateX(-50%);width:36px;height:44px;background:#fef3c7;border-radius:2px;box-shadow:0 2px 8px rgba(0,0,0,.2);opacity:0;z-index:3;display:flex;flex-direction:column;gap:4px;padding:8px 4px;border:1px solid #fcd34d}.btn-x-shredder .paper-line{height:2px;background:#d4a017;border-radius:1px;width:100%}.btn-x-shredder .paper-line.short{width:60%}.btn-x-shredder .strip-container{position:absolute;bottom:0;left:50%;transform:translateX(-50%);display:flex;gap:1.5px;z-index:2;opacity:0}.btn-x-shredder .strip{width:2px;height:0;background:linear-gradient(180deg,#fef3c7,#fcd34d);border-radius:0 0 1px 1px}.btn-x-shredder .btn-text{z-index:5;transition:all .3s;position:relative}.btn-x-shredder.is-unfolding .x-icon{transform:scale(0) rotate(180deg);opacity:0}.btn-x-shredder.is-unfolding .shredder-body{opacity:1;transform:scaleY(1)}.btn-x-shredder.is-shredding .paper{opacity:1;animation:paper-feed .8s ease-in forwards}.btn-x-shredder.is-shredding .btn-text{opacity:0}.btn-x-shredder.is-shredding .shredder-teeth span{animation:teeth-churn .15s ease-in-out infinite alternate}.btn-x-shredder.is-falling .strip-container{opacity:1}.btn-x-shredder.is-falling .strip{animation:strip-fall .7s ease-out forwards;animation-delay:calc(var(--i) * .06s)}.btn-x-shredder.is-closing{animation:btn-close .6s ease-in forwards;animation-delay:.3s}.btn-x-shredder.is-done{background:#0f172a;box-shadow:0 4px 15px rgba(0,0,0,.3)}.btn-x-shredder.is-done .btn-text{opacity:1;color:#4ade80}@keyframes paper-feed{0%{top:-30px;opacity:1}60%{top:5px;opacity:1}100%{top:20px;opacity:0;transform:translateX(-50%) scaleY(.3)}}@keyframes teeth-churn{0%{height:8px}100%{height:5px}}@keyframes strip-fall{0%{height:0;opacity:1;transform:translateY(0)}100%{height:25px;opacity:0;transform:translateY(30px)}}@keyframes btn-close{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.95)}100%{opacity:0;transform:scale(.8) translateY(10px)}}
Tailwind CSS
<button class="w-[180px] h-[56px] rounded-[14px] border-none bg-[#1a1a2e] text-slate-200 font-bold text-[15px] cursor-pointer relative flex items-center justify-center overflow-hidden font-sans shadow-lg"><span class="relative z-10">✕ Close</span></button>
React
import { useState } from 'react';
export function XShredderClose() {
  const [phase, setPhase] = useState('idle');
  const handleClick = () => {
    if (phase !== 'idle') return;
    setPhase('unfolding');
    setTimeout(() => setPhase('shredding'), 500);
    setTimeout(() => setPhase('falling'), 1300);
    setTimeout(() => setPhase('closing'), 2000);
    setTimeout(() => setPhase('done'), 2500);
    setTimeout(() => setPhase('idle'), 4000);
  };
  return (
    <button onClick={handleClick} disabled={phase !== 'idle'}
      className="btn-x-shredder" style={{ width: 180, height: 56, borderRadius: 14, border: 'none', background: phase === 'done' ? '#0f172a' : '#1a1a2e', color: phase === 'done' ? '#4ade80' : '#e2e8f0', fontSize: 15, fontWeight: 'bold', cursor: 'pointer', position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden', fontFamily: 'system-ui,sans-serif', transition: 'all 0.3s' }}>
      <div style={{ position: 'absolute', display: 'flex', gap: 2, zIndex: 2, opacity: phase === 'falling' ? 1 : 0, bottom: 0 }}>
        {[0,1,2,3,4,5,6].map(i => (
          <div key={i} style={{ width: 2, height: phase === 'falling' ? 25 : 0, background: 'linear-gradient(180deg, #fef3c7, #fcd34d)', borderRadius: '0 0 1px 1px', transition: 'height 0.7s ease-out', transitionDelay: `${i * 60}ms`, opacity: phase === 'falling' ? 0 : 1 }} />
        ))}
      </div>
      <span style={{ zIndex: 5, opacity: phase === 'shredding' || phase === 'falling' ? 0 : 1, transition: 'all 0.3s', color: phase === 'done' ? '#4ade80' : '#e2e8f0' }}>
        {phase === 'done' ? '✓ Closed' : phase === 'unfolding' ? '' : '✕ Close'}
      </span>
    </button>
  );
}
Vue
<template>
  <button class="btn-x-shredder" :class="phase" @click="handleClick" :disabled="phase!=='idle'">
    <div class="shredder-body">
      <div class="shredder-slot"></div>
      <div class="shredder-teeth"><span v-for="i in 8" :key="i"></span></div>
    </div>
    <div class="paper"><div class="paper-line"></div><div class="paper-line"></div><div class="paper-line short"></div></div>
    <div class="strip-container">
      <div v-for="i in 7" :key="i" class="strip" :style="{ '--i': i-1 }"></div>
    </div>
    <div class="x-icon"><span class="x-line x1"></span><span class="x-line x2"></span></div>
    <span class="btn-text">{{ label }}</span>
  </button>
</template>
<script setup>
import { ref, computed } from 'vue';
const phase = ref('idle');
const label = computed(() => ({ idle:'✕ Close', unfolding:'', shredding:'', falling:'', closing:'', done:'✓ Closed' }[phase.value]));
function handleClick() {
  if (phase.value !== 'idle') return;
  phase.value = 'unfolding';
  setTimeout(() => phase.value = 'shredding', 500);
  setTimeout(() => phase.value = 'falling', 1300);
  setTimeout(() => phase.value = 'closing', 2000);
  setTimeout(() => phase.value = 'done', 2500);
  setTimeout(() => phase.value = 'idle', 4000);
}
</script>
Svelte
<script>
  let phase = 'idle';
  $: label = ({idle:'✕ Close',unfolding:'',shredding:'',falling:'',closing:'',done:'✓ Closed'})[phase];
  function handleClick() {
    if (phase !== 'idle') return;
    phase = 'unfolding';
    setTimeout(() => phase = 'shredding', 500);
    setTimeout(() => phase = 'falling', 1300);
    setTimeout(() => phase = 'closing', 2000);
    setTimeout(() => phase = 'done', 2500);
    setTimeout(() => phase = 'idle', 4000);
  }
</script>
<button class="btn-x-shredder" class:is-unfolding={phase==='unfolding'} class:is-shredding={phase==='shredding'} class:is-falling={phase==='falling'} class:is-closing={phase==='closing'} class:is-done={phase==='done'} on:click={handleClick} disabled={phase!=='idle'}>
  <div class="shredder-body"><div class="shredder-slot"></div><div class="shredder-teeth"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></div></div>
  <div class="paper"><div class="paper-line"></div><div class="paper-line"></div><div class="paper-line short"></div></div>
  <div class="strip-container"><div class="strip" style="--i:0"></div><div class="strip" style="--i:1"></div><div class="strip" style="--i:2"></div><div class="strip" style="--i:3"></div><div class="strip" style="--i:4"></div><div class="strip" style="--i:5"></div><div class="strip" style="--i:6"></div></div>
  <div class="x-icon"><span class="x-line x1"></span><span class="x-line x2"></span></div>
  <span class="btn-text">{label}</span>
</button>
Angular
import { Component } from '@angular/core';
@Component({
  selector: 'app-x-shredder-close',
  template: `<button class="btn-x-shredder" [class.is-unfolding]="phase==='unfolding'" [class.is-shredding]="phase==='shredding'" [class.is-falling]="phase==='falling'" [class.is-closing]="phase==='closing'" [class.is-done]="phase==='done'" (click)="handleClick()" [disabled]="phase!=='idle'"><div class="shredder-body"><div class="shredder-slot"></div><div class="shredder-teeth"><span *ngFor="let i of [1,2,3,4,5,6,7,8]"></span></div></div><div class="paper"><div class="paper-line"></div><div class="paper-line"></div><div class="paper-line short"></div></div><div class="strip-container"><div *ngFor="let i of [0,1,2,3,4,5,6]" class="strip" [style.--i]="i"></div></div><div class="x-icon"><span class="x-line x1"></span><span class="x-line x2"></span></div><span class="btn-text">{{ label }}</span></button>`,
  styles: [`.btn-x-shredder{width:180px;height:56px;border-radius:14px;border:none;background:#1a1a2e;color:#e2e8f0;font-size:15px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.btn-x-shredder .x-icon{position:absolute;display:flex;z-index:5}.btn-x-shredder .x-line{position:absolute;width:20px;height:3px;background:#f43f5e;border-radius:2px}.btn-x-shredder .x-line.x1{transform:rotate(45deg)}.btn-x-shredder .x-line.x2{transform:rotate(-45deg)}.btn-x-shredder.is-done{background:#0f172a}.btn-x-shredder.is-done .btn-text{color:#4ade80}`]
})
export class XShredderCloseComponent { phase='idle'; get label() { return {idle:'✕ Close',unfolding:'',shredding:'',falling:'',closing:'',done:'✓ Closed'}[this.phase]; } handleClick() { if(this.phase!=='idle')return;this.phase='unfolding';setTimeout(()=>this.phase='shredding',500);setTimeout(()=>this.phase='falling',1300);setTimeout(()=>this.phase='closing',2000);setTimeout(()=>this.phase='done',2500);setTimeout(()=>this.phase='idle',4000); } }
LWC — HTML template
<template><button class="btn-x-shredder" onclick={handleClick} disabled={disabled}><span class="btn-text">{label}</span></button></template>
LWC — JavaScript
import { LightningElement } from 'lwc';
export default class XShredderClose extends LightningElement {
  phase = 'idle';
  get disabled() { return this.phase !== 'idle'; }
  get label() { return {idle:'✕ Close',unfolding:'',shredding:'',falling:'',closing:'',done:'✓ Closed'}[this.phase]; }
  handleClick() { if(this.phase!=='idle')return;this.phase='unfolding';setTimeout(()=>this.phase='shredding',500);setTimeout(()=>this.phase='falling',1300);setTimeout(()=>this.phase='closing',2000);setTimeout(()=>this.phase='done',2500);setTimeout(()=>this.phase='idle',4000); }
}
LWC — CSS
.btn-x-shredder{width:180px;height:56px;border-radius:14px;border:none;background:#1a1a2e;color:#e2e8f0;font-size:15px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:all .3s}.btn-x-shredder.is-done{background:#0f172a}.btn-x-shredder.is-done .btn-text{color:#4ade80}
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 X Shredder Close fits

  • Close
  • Delete
  • Cancel
  • Remove

Interaction states & animations

  • Unfold
  • Shred
  • Strip Fall
  • Screen Close

Topics

  • #shredder
  • #close
  • #delete
  • #paper
  • #strips
  • #industrial
  • #x-button

Accessibility notes

Animation is decorative. Button text remains readable. Respect reduced-motion preference. Provide confirmation for destructive actions.

Browser support

  • All modern browsers