Skip to content

Dog Mail Delivery

An animated dog sprite runs in, grabs an envelope, dashes away, and returns with a happy paw-print stamp — a playful multi-stage action button with a wholesome narrative arc.

Dog Mail Delivery

by FreeCsStyles Dev's

Character AnimationPlayful
🌐🎨⚛️💚🅰️🔥☁️
#dog#mail#animation#playful#character#pets#multi-stage#cute

Embed this component

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

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

Implementation code

Copy the HTML and CSS for Dog Mail 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-dog" id="dogBtn">
  <div class="scene">
    <span class="dog" id="dogIcon">🐕</span>
    <span class="mail">✉️</span>
  </div>
  <span class="text">Send Mail</span>
  <span class="paw">🐾</span>
</button>
<script>
const dogBtn = document.getElementById('dogBtn');
dogBtn.addEventListener('click', function() {
  if(this.classList.contains('is-fetching')) return;
  this.classList.add('is-fetching');
  setTimeout(() => this.classList.add('is-running'), 800);
  setTimeout(() => {
    this.classList.remove('is-fetching','is-running');
    this.classList.add('is-delivered');
    document.getElementById('dogIcon').textContent = '🐕‍🦺';
    this.querySelector('.text').textContent = 'Delivered';
  }, 1800);
  setTimeout(() => {
    this.classList.remove('is-delivered');
    document.getElementById('dogIcon').textContent = '🐕';
    this.querySelector('.text').textContent = 'Send Mail';
  }, 4000);
});
</script>
CSS
.btn-dog { width: 160px; height: 50px; border-radius: 12px; border: none; background: #ea580c; color: white; font-size: 16px; font-weight: bold; cursor: pointer; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; transition: all 0.4s cubic-bezier(0.4,0,0.2,1); font-family: system-ui,sans-serif; }
.btn-dog .scene { position: absolute; left: 10px; width: 40px; height: 20px; }
.btn-dog .dog { position: absolute; left: -40px; font-size: 20px; transition: 0.8s linear; }
.btn-dog .mail { position: absolute; left: 15px; font-size: 16px; transition: 0.1s; }
.btn-dog .paw { position: absolute; right: 10px; font-size: 20px; opacity: 0; transform: scale(0); transition: 0.4s cubic-bezier(0.5,0,0.2,1); }
.btn-dog .text { transition: 0.3s; margin-left: 20px; }
.btn-dog.is-fetching .text { opacity: 0; }
.btn-dog.is-fetching .dog { left: 10px; }
.btn-dog.is-running .dog { left: 150px; }
.btn-dog.is-running .mail { opacity: 0; left: 150px; transition: 0.8s linear; }
.btn-dog.is-delivered { background: #16a34a; }
.btn-dog.is-delivered .paw { opacity: 1; transform: scale(1) rotate(15deg); }
Tailwind CSS
<button class="w-[160px] h-[50px] rounded-xl border-none bg-orange-600 text-white font-bold cursor-pointer relative flex items-center justify-center overflow-hidden transition-all duration-[400ms] [transition-timing-function:cubic-bezier(0.4,0,0.2,1)]">
  <div class="absolute left-[10px] flex items-center w-10 h-5">
    <span class="dog absolute -left-10 text-xl transition-[left] duration-[800ms] linear">🐕</span>
    <span class="mail absolute left-[15px] text-base transition-all duration-[800ms] linear">✉️</span>
  </div>
  <span class="text ml-5 transition-opacity duration-300">Send Mail</span>
  <span class="paw absolute right-[10px] text-xl opacity-0 scale-0 transition-all duration-[400ms] [transition-timing-function:cubic-bezier(0.5,0,0.2,1)]">🐾</span>
</button>
React
import { useState } from 'react';

export function DogMailButton() {
  const [stage, setStage] = useState('idle');

  const handleClick = () => {
    if (stage !== 'idle') return;
    setStage('fetching');
    setTimeout(() => setStage('running'), 800);
    setTimeout(() => setStage('delivered'), 1800);
    setTimeout(() => setStage('idle'), 4000);
  };

  return (
    <button
      onClick={handleClick}
      disabled={stage !== 'idle'}
      className={`btn-dog ${stage}`}
      style={{
        width: 160, height: 50, borderRadius: 12, border: 'none',
        background: stage === 'delivered' ? '#16a34a' : '#ea580c',
        color: 'white', fontSize: 16, fontWeight: 'bold', cursor: 'pointer',
        position: 'relative', display: 'flex', alignItems: 'center',
        justifyContent: 'center', overflow: 'hidden',
        transition: 'all 0.4s cubic-bezier(0.4,0,0.2,1)',
        fontFamily: 'system-ui,sans-serif',
      }}
    >
      <div style={{ position: 'absolute', left: 10, width: 40, height: 20 }}>
        <span style={{
          position: 'absolute',
          left: stage === 'fetching' ? 10 : stage === 'running' ? 150 : stage === 'delivered' ? 10 : -40,
          fontSize: 20, transition: 'left 0.8s linear'
        }}>
          {stage === 'delivered' ? '🐕‍🦺' : '🐕'}
        </span>
        <span style={{
          position: 'absolute', left: 15, fontSize: 16,
          opacity: stage === 'running' || stage === 'delivered' ? 0 : 1,
          transition: 'opacity 0.1s'
        }}>✉️</span>
      </div>
      <span style={{ transition: '0.3s', marginLeft: 20, opacity: stage === 'fetching' || stage === 'running' ? 0 : 1 }}>
        {stage === 'delivered' ? 'Delivered' : 'Send Mail'}
      </span>
      <span style={{
        position: 'absolute', right: 10, fontSize: 20,
        opacity: stage === 'delivered' ? 1 : 0,
        transform: stage === 'delivered' ? 'scale(1) rotate(15deg)' : 'scale(0)',
        transition: '0.4s cubic-bezier(0.5,0,0.2,1)',
      }}>🐾</span>
    </button>
  );
}
Vue
<template>
  <button class="btn-dog" :class="stage" @click="handleClick" :disabled="stage!=='idle'">
    <div class="scene">
      <span class="dog" :style="{ left: dogPos }">{{ stage==='delivered' ? '🐕‍🦺' : '🐕' }}</span>
      <span class="mail" :style="{ opacity: mailOpacity }">✉️</span>
    </div>
    <span class="text">{{ stage==='delivered' ? 'Delivered' : 'Send Mail' }}</span>
    <span class="paw" :style="{ opacity: pawOpacity, transform: pawTransform }">🐾</span>
  </button>
</template>
<script setup>
import { ref, computed } from 'vue';
const stage = ref('idle');
const dogPos = computed(() => stage.value==='fetching'?'10px':stage.value==='running'?'150px':stage.value==='delivered'?'10px':'-40px');
const mailOpacity = computed(() => (stage.value==='running'||stage.value==='delivered')?0:1);
const pawOpacity = computed(() => stage.value==='delivered'?1:0);
const pawTransform = computed(() => stage.value==='delivered'?'scale(1) rotate(15deg)':'scale(0)');
function handleClick() {
  if (stage.value !== 'idle') return;
  stage.value = 'fetching';
  setTimeout(() => stage.value = 'running', 800);
  setTimeout(() => stage.value = 'delivered', 1800);
  setTimeout(() => stage.value = 'idle', 4000);
}
</script>
<style scoped>
.btn-dog{width:160px;height:50px;border-radius:12px;border:none;background:#ea580c;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 cubic-bezier(.4,0,.2,1);font-family:system-ui,sans-serif}.btn-dog .scene{position:absolute;left:10px;width:40px;height:20px}.btn-dog .dog{position:absolute;font-size:20px;transition:left .8s linear}.btn-dog .mail{position:absolute;left:15px;font-size:16px;transition:opacity .1s}.btn-dog .paw{position:absolute;right:10px;font-size:20px;transition:all .4s cubic-bezier(.5,0,.2,1)}.btn-dog.is-delivered{background:#16a34a}.btn-dog .text{transition:.3s;margin-left:20px}
</style>
Svelte
<script>
  let stage = 'idle';
  $: dogPos = stage === 'fetching' ? '10px' : stage === 'running' ? '150px' : stage === 'delivered' ? '10px' : '-40px';
  $: mailOpacity = (stage === 'running' || stage === 'delivered') ? 0 : 1;
  function handleClick() {
    if (stage !== 'idle') return;
    stage = 'fetching';
    setTimeout(() => stage = 'running', 800);
    setTimeout(() => stage = 'delivered', 1800);
    setTimeout(() => stage = 'idle', 4000);
  }
</script>
<button class="btn-dog" class:is-delivered={stage==='delivered'} on:click={handleClick} disabled={stage!=='idle'}>
  <div class="scene">
    <span class="dog" style="left: {dogPos}">{stage==='delivered' ? '🐕‍🦺' : '🐕'}</span>
    <span class="mail" style="opacity: {mailOpacity}">✉️</span>
  </div>
  <span class="text">{stage==='delivered' ? 'Delivered' : 'Send Mail'}</span>
  <span class="paw" style="opacity: {stage==='delivered' ? 1 : 0}; transform: {stage==='delivered' ? 'scale(1) rotate(15deg)' : 'scale(0)'}">🐾</span>
</button>
<style>
.btn-dog{width:160px;height:50px;border-radius:12px;border:none;background:#ea580c;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 cubic-bezier(.4,0,.2,1)}.btn-dog .scene{position:absolute;left:10px;width:40px;height:20px}.btn-dog .dog{position:absolute;font-size:20px;transition:left .8s linear}.btn-dog .mail{position:absolute;left:15px;font-size:16px;transition:opacity .1s}.btn-dog .paw{position:absolute;right:10px;font-size:20px;transition:all .4s cubic-bezier(.5,0,.2,1)}.btn-dog.is-delivered{background:#16a34a}.btn-dog .text{transition:.3s;margin-left:20px}
</style>
Angular
import { Component } from '@angular/core';
@Component({
  selector: 'app-dog-mail-button',
  template: `<button class="btn-dog" [class.is-delivered]="stage==='delivered'" (click)="handleClick()" [disabled]="stage!=='idle'">
    <div class="scene">
      <span class="dog" [style.left]="dogPos">{{ stage==='delivered' ? '🐕‍🦺' : '🐕' }}</span>
      <span class="mail" [style.opacity]="mailOpacity">✉️</span>
    </div>
    <span class="text">{{ stage==='delivered' ? 'Delivered' : 'Send Mail' }}</span>
    <span class="paw" [style.opacity]="pawOpacity" [style.transform]="pawTransform">🐾</span>
  </button>`,
  styles: [`.btn-dog{width:160px;height:50px;border-radius:12px;border:none;background:#ea580c;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 cubic-bezier(.4,0,.2,1)}.btn-dog .scene{position:absolute;left:10px;width:40px;height:20px}.btn-dog .dog{position:absolute;font-size:20px;transition:left .8s linear}.btn-dog .mail{position:absolute;left:15px;font-size:16px;transition:opacity .1s}.btn-dog .paw{position:absolute;right:10px;font-size:20px;transition:all .4s cubic-bezier(.5,0,.2,1)}.btn-dog.is-delivered{background:#16a34a}.btn-dog .text{transition:.3s;margin-left:20px}`]
})
export class DogMailButtonComponent { stage='idle';get dogPos(){return this.stage==='fetching'?'10px':this.stage==='running'?'150px':this.stage==='delivered'?'10px':'-40px'}get mailOpacity(){return(this.stage==='running'||this.stage==='delivered')?0:1}get pawOpacity(){return this.stage==='delivered'?1:0}get pawTransform(){return this.stage==='delivered'?'scale(1) rotate(15deg)':'scale(0)'}handleClick(){if(this.stage!=='idle')return;this.stage='fetching';setTimeout(()=>this.stage='running',800);setTimeout(()=>this.stage='delivered',1800);setTimeout(()=>this.stage='idle',4000);}}
LWC — HTML template
<template><button class="btn-dog" onclick={handleClick} disabled={disabled}>
  <div class="scene"><span class="dog" style={dogStyle}>{dogIcon}</span><span class="mail" style={mailStyle}>✉️</span></div>
  <span class="text">{label}</span><span class="paw" style={pawStyle}>🐾</span>
</button></template>
LWC — JavaScript
import { LightningElement } from 'lwc';
export default class DogMailButton extends LightningElement {
  stage = 'idle';
  get disabled() { return this.stage !== 'idle'; }
  get dogIcon() { return this.stage === 'delivered' ? '🐕‍🦺' : '🐕'; }
  get dogStyle() { const s={'fetching':'10px','running':'150px','delivered':'10px'};return `left: ${s[this.stage]||'-40px'}; font-size: 20px; position: absolute; transition: left 0.8s linear;`; }
  get mailStyle() { return `opacity: ${(this.stage==='running'||this.stage==='delivered')?0:1}; position: absolute; left: 15px; font-size: 16px; transition: opacity 0.1s;`; }
  get label() { return this.stage === 'delivered' ? 'Delivered' : 'Send Mail'; }
  get pawStyle() { return `opacity: ${this.stage==='delivered'?1:0}; transform: ${this.stage==='delivered'?'scale(1) rotate(15deg)':'scale(0)'}; position: absolute; right: 10px; font-size: 20px; transition: all 0.4s cubic-bezier(0.5,0,0.2,1);`; }
  handleClick() {
    if (this.stage !== 'idle') return;
    this.stage = 'fetching';
    setTimeout(() => this.stage = 'running', 800);
    setTimeout(() => this.stage = 'delivered', 1800);
    setTimeout(() => this.stage = 'idle', 4000);
  }
}
LWC — CSS
.btn-dog{width:160px;height:50px;border-radius:12px;border:none;background:#ea580c;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 cubic-bezier(.4,0,.2,1);font-family:system-ui,sans-serif}.btn-dog .scene{position:absolute;left:10px;width:40px;height:20px}.btn-dog .text{transition:.3s;margin-left:20px}.btn-dog.is-delivered{background:#16a34a}
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 Dog Mail Delivery fits

  • Send Actions
  • Playful UI
  • Gamified Interactions
  • Kids Apps
  • Confirmation Buttons

Interaction states & animations

  • Multi-stage
  • Character
  • Slide
  • Success State

Topics

  • #dog
  • #mail
  • #animation
  • #playful
  • #character
  • #pets
  • #multi-stage
  • #cute

Accessibility notes

Button auto-resets after 4s. Provide screen reader announcement for each stage. Ensure reduced motion alternative.

Browser support

  • All modern browsers