Skip to content

Black Hole Delete

A file icon gets spaghettified and pulled into a glowing singularity, then collapses into darkness

Black Hole Delete

by FreeCsStyles Dev's

AnimatedSci-Fi
🌐🎨⚛️💚🅰️🔥☁️
#black-hole#delete#singularity#space#spaghettify#collapse#dramatic

Embed this component

Paste this snippet into any site — the design renders in a sandboxed iframe served from /embed/black-hole-delete.

<iframe src="/embed/black-hole-delete" sandbox="allow-scripts" loading="lazy" title="Black Hole Delete" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Black Hole Delete, 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-blackhole"><span class="file-icon">📄</span><span class="text">Delete</span><span class="singularity"></span></button>
CSS
.btn-blackhole{width:160px;height:50px;border-radius:12px;border:none;background:#4c1d95;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;box-shadow:0 4px 15px rgba(76,29,149,.4)}.btn-blackhole .file-icon{position:absolute;left:20px;font-size:18px;transition:.3s}.btn-blackhole .singularity{position:absolute;right:-40px;width:30px;height:30px;background:#000;border:2px solid #a855f7;border-radius:50%;box-shadow:0 0 15px #a855f7;transition:all .6s ease;opacity:0}.btn-blackhole.is-sucking .file-icon{animation:spaghettify 1s forwards cubic-bezier(.5,0,1,1)}.btn-blackhole.is-sucking .singularity{right:20px;opacity:1;transform:scale(1.3) rotate(360deg)}.btn-blackhole.is-sucking .text{opacity:0}.btn-blackhole.is-collapsed{background:#000;box-shadow:0 0 0 transparent;border:1px solid #333}.btn-blackhole.is-collapsed .singularity{transform:scale(0);opacity:0}@keyframes spaghettify{0%{transform:translate(0,0) scale(1) rotate(0deg);opacity:1}50%{transform:translate(80px,0) scaleX(2.5) scaleY(.3) rotate(45deg);opacity:.8}100%{transform:translate(110px,0) scale(0) rotate(180deg);opacity:0}}
Tailwind CSS
<button class="w-[160px] h-[50px] rounded-xl border-none bg-purple-800 text-white font-bold cursor-pointer relative flex items-center justify-center overflow-hidden transition-all duration-[400ms] font-sans shadow-[0_4px_15px_rgba(76,29,149,0.4)]"><span class="relative z-10">🕳 Delete</span></button>
React
import { useState } from 'react';
export function BlackHoleDelete() {
  const [phase, setPhase] = useState('idle');
  const handleClick = () => {
    if (phase !== 'idle') return;
    setPhase('sucking');
    setTimeout(() => setPhase('collapsed'), 1200);
    setTimeout(() => setPhase('idle'), 4000);
  };
  return (
    <button onClick={handleClick} disabled={phase !== 'idle'}
      style={{ width: 160, height: 50, borderRadius: 12, border: phase === 'collapsed' ? '1px solid #333' : 'none', background: phase === 'collapsed' ? '#000' : '#4c1d95', 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', boxShadow: phase === 'collapsed' ? 'none' : '0 4px 15px rgba(76,29,149,0.4)' }}>
      <span>{phase === 'idle' ? '🕳 Delete' : phase === 'collapsed' ? 'Erased' : ''}</span>
    </button>
  );
}
Vue
<template>
  <button class="btn-blackhole" :class="phase" @click="handleClick" :disabled="phase!=='idle'">
    <span class="file-icon">📄</span>
    <span class="text">{{ phase==='idle' ? 'Delete' : phase==='collapsed' ? 'Erased' : '' }}</span>
    <span class="singularity"></span>
  </button>
</template>
<script setup>
import { ref } from 'vue';
const phase = ref('idle');
function handleClick() {
  if (phase.value !== 'idle') return;
  phase.value = 'sucking';
  setTimeout(() => phase.value = 'collapsed', 1200);
  setTimeout(() => phase.value = 'idle', 4000);
}
</script>
Svelte
<script>
  let phase = 'idle';
  function handleClick() { if (phase !== 'idle') return; phase = 'sucking'; setTimeout(() => phase = 'collapsed', 1200); setTimeout(() => phase = 'idle', 4000); }
</script>
<button class="btn-blackhole" class:is-collapsed={phase==='collapsed'} on:click={handleClick} disabled={phase!=='idle'}>
  <span class="file-icon">📄</span>
  <span class="text">{phase==='idle' ? 'Delete' : phase==='collapsed' ? 'Erased' : ''}</span>
  <span class="singularity"></span>
</button>
Angular
import { Component } from '@angular/core';
@Component({
  selector: 'app-black-hole-delete',
  template: `<button class="btn-blackhole" [class.is-sucking]="phase==='sucking'" [class.is-collapsed]="phase==='collapsed'" (click)="handleClick()" [disabled]="phase!=='idle'"><span class="file-icon">📄</span><span class="text">{{ phase==='idle' ? 'Delete' : phase==='collapsed' ? 'Erased' : '' }}</span><span class="singularity"></span></button>`,
  styles: [`.btn-blackhole{width:160px;height:50px;border-radius:12px;border:none;background:#4c1d95;color:#fff;font-size:16px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.btn-blackhole.is-collapsed{background:#000;border:1px solid #333}`]
})
export class BlackHoleDeleteComponent { phase='idle';handleClick(){if(this.phase!=='idle')return;this.phase='sucking';setTimeout(()=>this.phase='collapsed',1200);setTimeout(()=>this.phase='idle',4000);}}
LWC — HTML template
<template><button class="btn-blackhole" onclick={handleClick} disabled={disabled}><span class="file-icon">📄</span><span>{label}</span><span class="singularity"></span></button></template>
LWC — JavaScript
import { LightningElement } from 'lwc';
export default class BlackHoleDelete extends LightningElement {
  phase = 'idle';
  get disabled() { return this.phase !== 'idle'; }
  get label() { return this.phase==='idle'?'Delete':this.phase==='collapsed'?'Erased':''; }
  handleClick() { if(this.phase!=='idle')return;this.phase='sucking';setTimeout(()=>this.phase='collapsed',1200);setTimeout(()=>this.phase='idle',4000); }
}
LWC — CSS
.btn-blackhole{width:160px;height:50px;border-radius:12px;border:none;background:#4c1d95;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-blackhole .file-icon{position:absolute;left:20px;font-size:18px}.btn-blackhole .singularity{position:absolute;right:-40px;width:30px;height:30px;background:#000;border:2px solid #a855f7;border-radius:50%;box-shadow:0 0 15px #a855f7;opacity:0}.btn-blackhole.is-collapsed{background:#000;border:1px solid #333}
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 Black Hole Delete fits

  • Delete Actions
  • Destructive Actions
  • File Management
  • Dramatic UI

Interaction states & animations

  • Spaghettification
  • Singularity Collapse
  • Suck Effect

Topics

  • #black-hole
  • #delete
  • #singularity
  • #space
  • #spaghettify
  • #collapse
  • #dramatic

Accessibility notes

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

Browser support

  • All modern browsers