Skip to content

Submarine Delivery

A submarine dives underwater carrying a secure file, sonar pings, and arrives safely

Submarine Delivery

by FreeCsStyles Dev's

AnimatedStorybook
🌐🎨⚛️💚🅰️🔥☁️
#submarine#underwater#secure#delivery#sonar#ocean

Embed this component

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

<iframe src="/embed/submarine-delivery" sandbox="allow-scripts" loading="lazy" title="Submarine Delivery" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Submarine Delivery, 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-sub"><span class="sub">🚢</span><span class="text">Secure Transfer</span><span class="ping">📡</span></button>
CSS
.btn-sub{width:170px;height:50px;border-radius:12px;border:none;background:#0369a1;color:#fff;font-size:14px;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-sub .sub{position:absolute;font-size:20px;left:50%;top:50%;transform:translate(-50%,-50%);transition:all 1s cubic-bezier(.4,0,.2,1);z-index:2}.btn-sub .ping{position:absolute;font-size:12px;right:-25px;opacity:0;transition:all .4s}.btn-sub .text{z-index:3;transition:.3s}.btn-sub.is-diving .sub{top:65px;left:80%}.btn-sub.is-diving .text{opacity:0}.btn-sub.is-diving .ping{opacity:1;animation:ping-pulse .6s ease-in-out 3}.btn-sub.is-delivered{background:#0e7490;border:1px solid #67e8f9}@keyframes ping-pulse{0%{transform:scale(1);opacity:1}50%{transform:scale(1.5);opacity:.5}100%{transform:scale(1);opacity:1}}
Tailwind CSS
<button class="w-[170px] h-[50px] rounded-xl border-none bg-sky-800 text-white font-bold cursor-pointer relative flex items-center justify-center overflow-hidden transition-all duration-[400ms] font-sans"><span class="relative z-10">🚢 Secure Transfer</span></button>
React
import { useState } from 'react';
export function SubmarineDelivery() {
  const [phase, setPhase] = useState('idle');
  const handleClick = () => {
    if (phase !== 'idle') return;
    setPhase('diving');
    setTimeout(() => setPhase('delivered'), 1500);
    setTimeout(() => setPhase('idle'), 4000);
  };
  return (
    <button onClick={handleClick} disabled={phase !== 'idle'}
      style={{ width: 170, height: 50, borderRadius: 12, border: phase === 'delivered' ? '1px solid #67e8f9' : 'none', background: phase === 'delivered' ? '#0e7490' : '#0369a1', color: '#fff', fontSize: 14, fontWeight: 'bold', cursor: 'pointer', position: 'relative', display: 'flex', alignItems: 'center', justifyContent: 'center', overflow: 'hidden', fontFamily: 'system-ui,sans-serif', transition: 'all 0.4s' }}>
      <span>{phase === 'idle' ? '🚢 Secure Transfer' : phase === 'delivered' ? '✓ Secure' : ''}</span>
    </button>
  );
}
Vue
<template>
  <button class="btn-sub" :class="phase" @click="handleClick" :disabled="phase!=='idle'">
    <span class="sub">🚢</span>
    <span class="ping">📡</span>
    <span class="text">{{ phase==='idle' ? 'Secure Transfer' : phase==='delivered' ? 'Secure' : '' }}</span>
  </button>
</template>
<script setup>
import { ref } from 'vue';
const phase = ref('idle');
function handleClick() {
  if (phase.value !== 'idle') return;
  phase.value = 'diving';
  setTimeout(() => phase.value = 'delivered', 1500);
  setTimeout(() => phase.value = 'idle', 4000);
}
</script>
Svelte
<script>
  let phase = 'idle';
  function handleClick() { if (phase !== 'idle') return; phase = 'diving'; setTimeout(() => phase = 'delivered', 1500); setTimeout(() => phase = 'idle', 4000); }
</script>
<button class="btn-sub" class:is-delivered={phase==='delivered'} on:click={handleClick} disabled={phase!=='idle'}>
  <span class="sub">🚢</span>
  <span>{phase==='idle' ? '🚢 Secure Transfer' : phase==='delivered' ? '✓ Secure' : ''}</span>
</button>
Angular
import { Component } from '@angular/core';
@Component({
  selector: 'app-submarine-delivery',
  template: `<button class="btn-sub" [class.is-diving]="phase==='diving'" [class.is-delivered]="phase==='delivered'" (click)="handleClick()" [disabled]="phase!=='idle'"><span>{{ phase==='idle' ? '🚢 Secure Transfer' : phase==='delivered' ? '✓ Secure' : '' }}</span></button>`,
  styles: [`.btn-sub{width:170px;height:50px;border-radius:12px;border:none;background:#0369a1;color:#fff;font-size:14px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.btn-sub.is-delivered{background:#0e7490;border:1px solid #67e8f9}`]
})
export class SubmarineDeliveryComponent { phase='idle';handleClick(){if(this.phase!=='idle')return;this.phase='diving';setTimeout(()=>this.phase='delivered',1500);setTimeout(()=>this.phase='idle',4000);}}
LWC — HTML template
<template><button class="btn-sub" onclick={handleClick} disabled={disabled}><span>{label}</span></button></template>
LWC — JavaScript
import { LightningElement } from 'lwc';
export default class SubmarineDelivery extends LightningElement {
  phase = 'idle';
  get disabled() { return this.phase !== 'idle'; }
  get label() { return this.phase==='idle'?'🚢 Secure Transfer':this.phase==='delivered'?'✓ Secure':''; }
  handleClick() { if(this.phase!=='idle')return;this.phase='diving';setTimeout(()=>this.phase='delivered',1500);setTimeout(()=>this.phase='idle',4000); }
}
LWC — CSS
.btn-sub{width:170px;height:50px;border-radius:12px;border:none;background:#0369a1;color:#fff;font-size:14px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;transition:all .4s}.btn-sub.is-delivered{background:#0e7490;border:1px solid #67e8f9}
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 Submarine Delivery fits

  • Secure Transfer
  • Encrypted Delivery
  • Secure Actions
  • Protected Transfer

Interaction states & animations

  • Submarine Dive
  • Sonar Ping
  • Underwater

Topics

  • #submarine
  • #underwater
  • #secure
  • #delivery
  • #sonar
  • #ocean

Accessibility notes

Animation is decorative. Button text remains readable. Respect reduced-motion preference.

Browser support

  • All modern browsers