Shredder Machine
A document is pulled into spinning blades and shredded into falling paper strips
Shredder Machine
by FreeCsStyles Dev's
AnimatedIndustrial
🌐HTML/CSS🎨Tailwind⚛️React💚Vue🅰️Angular🔥Svelte☁️LWC
#shredder#delete#document#paper#shred#strips#industrial
Embed this component
Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/shredder-machine.
<iframe src="/embed/shredder-machine" sandbox="allow-scripts" loading="lazy" title="Shredder Machine" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>Implementation code
Copy the HTML and CSS for Shredder Machine, 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-shredder" onclick="this.classList.toggle('is-shredding')"><span class="doc">📑</span><span class="text">Shred</span></button>CSS
.btn-shredder{width:160px;height:50px;border-radius:12px;border:none;background:#dc2626;color:#fff;font-size:16px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:all .4s;font-family:system-ui,sans-serif}.btn-shredder .doc{position:absolute;top:-25px;font-size:18px;transition:.6s ease-in}.btn-shredder .strip{position:absolute;bottom:0;width:3px;height:15px;background:#f87171;opacity:0;pointer-events:none}.btn-shredder.is-shredding .doc{transform:translateY(35px) scaleY(0);opacity:0}.btn-shredder.is-shredding .strip{animation:shred-fall .8s forwards ease-out}.btn-shredder.is-deleted{background:#451a03}@keyframes shred-fall{0%{transform:translateY(0) scaleY(1);opacity:1}100%{transform:translateY(35px) scaleY(.2);opacity:0}}Tailwind CSS
<button class="w-[160px] h-[50px] rounded-xl border-none bg-red-600 text-white font-bold cursor-pointer relative flex items-center justify-center overflow-hidden transition-all duration-[400ms] font-sans"><span class="doc" style="position:absolute;top:-25px;font-size:18px">📑</span><span class="relative z-10">Shred</span></button>React
import { useState } from 'react';
export function ShredderMachine() {
const [phase, setPhase] = useState('idle');
const handleClick = () => {
if (phase !== 'idle') return;
setPhase('shredding');
setTimeout(() => setPhase('deleted'), 1500);
setTimeout(() => setPhase('idle'), 4000);
};
return (
<button onClick={handleClick} disabled={phase !== 'idle'}
style={{ width: 160, height: 50, borderRadius: 12, border: 'none', background: phase === 'deleted' ? '#451a03' : '#dc2626', color: '#fff', fontSize: 16, fontWeight: 'bold', cursor: 'pointer', position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden', fontFamily: 'system-ui,sans-serif', transition: 'all 0.4s' }}>
<span className="doc" style={{position:'absolute',top:-25,fontSize:18}}>📑</span>
<span>{phase === 'idle' ? 'Shred' : phase === 'shredding' ? 'Shredding...' : '🗑 Deleted'}</span>
</button>
);
}Vue
<template>
<button class="btn-shredder" :class="phase" @click="handleClick" :disabled="phase!=='idle'">
<span class="doc">📑</span>
<span class="text">{{ phase==='idle' ? 'Shred' : phase==='shredding' ? 'Shredding...' : '🗑 Deleted' }}</span>
</button>
</template>
<script setup>
import { ref } from 'vue';
const phase = ref('idle');
function handleClick() {
if (phase.value !== 'idle') return;
phase.value = 'shredding';
setTimeout(() => phase.value = 'deleted', 1500);
setTimeout(() => phase.value = 'idle', 4000);
}
</script>Svelte
<script>
let phase = 'idle';
function handleClick() { if (phase !== 'idle') return; phase = 'shredding'; setTimeout(() => phase = 'deleted', 1500); setTimeout(() => phase = 'idle', 4000); }
</script>
<button class="btn-shredder" class:is-deleted={phase==='deleted'} on:click={handleClick} disabled={phase!=='idle'}>
<span class="doc">📑</span>
<span class="text">{phase==='idle' ? 'Shred' : phase==='shredding' ? 'Shredding...' : '🗑 Deleted'}</span>
</button>Angular
import { Component } from '@angular/core';
@Component({
selector: 'app-shredder-machine',
template: `<button class="btn-shredder" [class.is-shredding]="phase==='shredding'" [class.is-deleted]="phase==='deleted'" (click)="handleClick()" [disabled]="phase!=='idle'"><span class="doc">📑</span><span class="text">{{ phase==='idle' ? 'Shred' : phase==='shredding' ? 'Shredding...' : '🗑 Deleted' }}</span></button>`,
styles: [`.btn-shredder{width:160px;height:50px;border-radius:12px;border:none;background:#dc2626;color:#fff;font-size:16px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.btn-shredder.is-deleted{background:#451a03}`]
})
export class ShredderMachineComponent { phase='idle';handleClick(){if(this.phase!=='idle')return;this.phase='shredding';setTimeout(()=>this.phase='deleted',1500);setTimeout(()=>this.phase='idle',4000);}}LWC — HTML template
<template><button class="btn-shredder" onclick={handleClick} disabled={disabled}><span>{label}</span></button></template>LWC — JavaScript
import { LightningElement } from 'lwc';
export default class ShredderMachine extends LightningElement {
phase = 'idle';
get disabled() { return this.phase !== 'idle'; }
get label() { return this.phase==='idle'?'📑 Shred':this.phase==='shredding'?'Shredding...':'🗑 Deleted'; }
handleClick() { if(this.phase!=='idle')return;this.phase='shredding';setTimeout(()=>this.phase='deleted',1500);setTimeout(()=>this.phase='idle',4000); }
}LWC — CSS
.btn-shredder{width:160px;height:50px;border-radius:12px;border:none;background:#dc2626;color:#fff;font-size:16px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:all .4s}.btn-shredder.is-deleted{background:#451a03}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 Shredder Machine fits
- Delete Actions
- File Management
- Document Processing
- Dramatic UI
Interaction states & animations
- Shred
- Strip Fall
- Document Delete
Topics
- #shredder
- #delete
- #document
- #paper
- #shred
- #strips
- #industrial
Accessibility notes
Animation is decorative. Button text remains readable. Respect reduced-motion preference. Provide confirmation for destructive actions.
Browser support
- All modern browsers