Skip to content

Bottle in the Ocean

A message rolls into a bottle, cork closes, drops into ocean waves, and sparkles on the horizon

Bottle in the Ocean

by FreeCsStyles Dev's

AnimatedStorybook
🌐🎨⚛️💚🅰️🔥☁️
#bottle#ocean#message#feedback#wave#float#sparkle

Embed this component

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

<iframe src="/embed/bottle-in-the-ocean" sandbox="allow-scripts" loading="lazy" title="Bottle in the Ocean" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Bottle in the Ocean, 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-bottle"><span class="bottle">🍾</span><span class="text">Send Feedback</span><span class="wave">🌊</span></button>
CSS
.btn-bottle{width:170px;height:50px;border-radius:12px;border:none;background:#0284c7;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-bottle .bottle{position:absolute;font-size:20px;left:-30px;transition:all 1.2s cubic-bezier(.3,.8,.5,1);z-index:2}.btn-bottle .wave{position:absolute;font-size:16px;right:-30px;opacity:0;transition:all 1s}.btn-bottle .text{z-index:1;transition:.3s}.btn-bottle.is-floating .bottle{left:170px;top:-15px;transform:rotate(15deg)}.btn-bottle.is-floating .wave{opacity:1;right:10px;animation:wave-bob 1s ease-in-out infinite}.btn-bottle.is-floating .text{opacity:0}.btn-bottle.is-sent{background:#0d9488;border:1px solid #5eead4}@keyframes wave-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
Tailwind CSS
<button class="w-[170px] h-[50px] rounded-xl border-none bg-sky-600 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">🍾 Send Feedback</span></button>
React
import { useState } from 'react';
export function BottleInTheOcean() {
  const [phase, setPhase] = useState('idle');
  const handleClick = () => {
    if (phase !== 'idle') return;
    setPhase('floating');
    setTimeout(() => setPhase('sent'), 1500);
    setTimeout(() => setPhase('idle'), 4000);
  };
  return (
    <button onClick={handleClick} disabled={phase !== 'idle'}
      style={{ width: 170, height: 50, borderRadius: 12, border: phase === 'sent' ? '1px solid #5eead4' : 'none', background: phase === 'sent' ? '#0d9488' : '#0284c7', 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' ? '🍾 Send Feedback' : phase === 'sent' ? '✨ Sent!' : ''}</span>
    </button>
  );
}
Vue
<template>
  <button class="btn-bottle" :class="phase" @click="handleClick" :disabled="phase!=='idle'">
    <span class="bottle">🍾</span>
    <span class="wave">🌊</span>
    <span class="text">{{ phase==='idle' ? 'Send Feedback' : phase==='sent' ? 'Sent!' : '' }}</span>
  </button>
</template>
<script setup>
import { ref } from 'vue';
const phase = ref('idle');
function handleClick() {
  if (phase.value !== 'idle') return;
  phase.value = 'floating';
  setTimeout(() => phase.value = 'sent', 1500);
  setTimeout(() => phase.value = 'idle', 4000);
}
</script>
Svelte
<script>
  let phase = 'idle';
  function handleClick() { if (phase !== 'idle') return; phase = 'floating'; setTimeout(() => phase = 'sent', 1500); setTimeout(() => phase = 'idle', 4000); }
</script>
<button class="btn-bottle" class:is-sent={phase==='sent'} on:click={handleClick} disabled={phase!=='idle'}>
  <span class="bottle">🍾</span>
  <span class="wave">🌊</span>
  <span>{phase==='idle' ? '🍾 Send Feedback' : phase==='sent' ? '✨ Sent!' : ''}</span>
</button>
Angular
import { Component } from '@angular/core';
@Component({
  selector: 'app-bottle-in-the-ocean',
  template: `<button class="btn-bottle" [class.is-floating]="phase==='floating'" [class.is-sent]="phase==='sent'" (click)="handleClick()" [disabled]="phase!=='idle'"><span>{{ phase==='idle' ? '🍾 Send Feedback' : phase==='sent' ? '✨ Sent!' : '' }}</span></button>`,
  styles: [`.btn-bottle{width:170px;height:50px;border-radius:12px;border:none;background:#0284c7;color:#fff;font-size:14px;font-weight:700;cursor:pointer;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden}.btn-bottle.is-sent{background:#0d9488;border:1px solid #5eead4}`]
})
export class BottleInTheOceanComponent { phase='idle';handleClick(){if(this.phase!=='idle')return;this.phase='floating';setTimeout(()=>this.phase='sent',1500);setTimeout(()=>this.phase='idle',4000);}}
LWC — HTML template
<template><button class="btn-bottle" onclick={handleClick} disabled={disabled}><span>{label}</span></button></template>
LWC — JavaScript
import { LightningElement } from 'lwc';
export default class BottleInTheOcean extends LightningElement {
  phase = 'idle';
  get disabled() { return this.phase !== 'idle'; }
  get label() { return this.phase==='idle'?'🍾 Send Feedback':this.phase==='sent'?'✨ Sent!':''; }
  handleClick() { if(this.phase!=='idle')return;this.phase='floating';setTimeout(()=>this.phase='sent',1500);setTimeout(()=>this.phase='idle',4000); }
}
LWC — CSS
.btn-bottle{width:170px;height:50px;border-radius:12px;border:none;background:#0284c7;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-bottle.is-sent{background:#0d9488;border:1px solid #5eead4}
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 Bottle in the Ocean fits

  • Send Feedback
  • Send Message
  • Feedback Form
  • Contact

Interaction states & animations

  • Bottle Float
  • Wave Animation
  • Sparkle

Topics

  • #bottle
  • #ocean
  • #message
  • #feedback
  • #wave
  • #float
  • #sparkle

Accessibility notes

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

Browser support

  • All modern browsers