Skip to content

Chef Cooking

A frying pan shakes with sizzling ingredients being tossed in the air, culminating in a plated dish served with a golden background.

Chef Cooking

by FreeCsStyles Dev's

Character AnimationPlayful
🌐🎨⚛️💚🅰️🔥☁️
#chef#cooking#pan#food#recipe#kitchen#toss#dish

Embed this component

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

<iframe src="/embed/chef-cooking" sandbox="allow-scripts" loading="lazy" title="Chef Cooking" style="border:0;width:100%;height:480px;overflow:hidden"></iframe>

Implementation code

Copy the HTML and CSS for Chef Cooking, 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-chef" id="chefBtn">
  <span class="pan">🍳</span>
  <span class="food">🍅</span>
  <span class="dish">🍝</span>
  <span class="text">Cook</span>
</button>
<script>
const chefBtn = document.getElementById('chefBtn');
chefBtn.addEventListener('click', function() {
  if(this.classList.contains('is-cooking')||this.classList.contains('is-served')) return;
  this.classList.add('is-cooking');
  this.querySelector('.text').textContent = 'Cooking...';
  setTimeout(() => {
    this.classList.remove('is-cooking');
    this.classList.add('is-served');
    this.querySelector('.text').textContent = 'Served!';
  }, 2000);
  setTimeout(() => {
    this.classList.remove('is-served');
    this.querySelector('.text').textContent = 'Cook';
  }, 4500);
});
</script>
CSS
.btn-chef{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 cubic-bezier(.4,0,.2,1);font-family:system-ui,sans-serif}.btn-chef .pan{position:absolute;left:15px;font-size:22px;opacity:0}.btn-chef .food{position:absolute;left:25px;top:-20px;font-size:12px;opacity:0}.btn-chef .dish{position:absolute;left:15px;font-size:22px;opacity:0;transform:scale(0);transition:.4s}.btn-chef.is-cooking .text{margin-left:30px}.btn-chef.is-cooking .pan{opacity:1;animation:pan-shake .3s infinite}.btn-chef.is-cooking .food{animation:food-toss .6s infinite}.btn-chef.is-served{background:#d97706}.btn-chef.is-served .pan,.btn-chef.is-served .food{opacity:0;animation:none}.btn-chef.is-served .dish{opacity:1;transform:scale(1)}@keyframes pan-shake{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg) translateY(-2px)}}@keyframes food-toss{0%{transform:translateY(0) rotate(0);opacity:1}50%{transform:translateY(-15px) rotate(90deg);opacity:1}100%{transform:translateY(0) rotate(180deg);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]">
  <span class="pan absolute left-[15px] text-[22px] opacity-0">🍳</span>
  <span class="food absolute left-[25px] -top-[20px] text-xs opacity-0">🍅</span>
  <span class="dish absolute left-[15px] text-[22px] opacity-0 scale-0 transition-all duration-[400ms]">🍝</span>
  <span class="text">Cook</span>
</button>
React
import { useState } from 'react';

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

  const handleClick = () => {
    if (stage !== 'idle') return;
    setStage('cooking');
    setTimeout(() => setStage('served'), 2000);
    setTimeout(() => setStage('idle'), 4500);
  };

  return (
    <button
      onClick={handleClick}
      disabled={stage !== 'idle'}
      style={{
        width: 160, height: 50, borderRadius: 12, border: 'none',
        background: stage === 'served' ? '#d97706' : '#dc2626',
        color: 'white', 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 cubic-bezier(0.4,0,0.2,1)',
      }}
    >
      <span style={{
        position: 'absolute', left: 15, fontSize: 22,
        opacity: stage === 'idle' ? 0 : stage === 'served' ? 0 : 1,
        animation: stage === 'cooking' ? 'panShake 0.3s infinite' : 'none',
      }}>🍳</span>
      <span style={{
        position: 'absolute', left: 25, top: -20, fontSize: 12,
        opacity: stage === 'cooking' ? 1 : 0,
        animation: stage === 'cooking' ? 'foodToss 0.6s infinite' : 'none',
      }}>🍅</span>
      <span style={{
        position: 'absolute', left: 15, fontSize: 22,
        opacity: stage === 'served' ? 1 : 0,
        transform: stage === 'served' ? 'scale(1)' : 'scale(0)',
        transition: 'all 0.4s',
      }}>🍝</span>
      <span style={{ marginLeft: stage !== 'idle' ? 30 : 0, transition: '0.3s' }}>
        {stage === 'idle' ? 'Cook' : stage === 'cooking' ? 'Cooking...' : 'Served!'}
      </span>
      <style>{'@keyframes panShake{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg) translateY(-2px)}}@keyframes foodToss{0%{transform:translateY(0) rotate(0);opacity:1}50%{transform:translateY(-15px) rotate(90deg);opacity:1}100%{transform:translateY(0) rotate(180deg);opacity:0}}'}</style>
    </button>
  );
}
Vue
<template>
  <button class="btn-chef" :class="stage" @click="handleClick" :disabled="stage!=='idle'">
    <span class="pan" :style="{ opacity: stage==='cooking'?1:0 }">🍳</span>
    <span class="food" :style="{ opacity: stage==='cooking'?1:0 }">🍅</span>
    <span class="dish" :style="{ opacity: stage==='served'?1:0, transform: stage==='served'?'scale(1)':'scale(0)' }">🍝</span>
    <span class="text">{{ stage==='idle' ? 'Cook' : stage==='cooking' ? 'Cooking...' : 'Served!' }}</span>
  </button>
</template>
<script setup>
import { ref } from 'vue';
const stage = ref('idle');
function handleClick() {
  if (stage.value !== 'idle') return;
  stage.value = 'cooking';
  setTimeout(() => stage.value = 'served', 2000);
  setTimeout(() => stage.value = 'idle', 4500);
}
</script>
<style scoped>
.btn-chef{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-chef .pan{position:absolute;left:15px;font-size:22px;animation:pan-shake .3s infinite}.btn-chef .food{position:absolute;left:25px;top:-20px;font-size:12px;animation:food-toss .6s infinite}.btn-chef .dish{position:absolute;left:15px;font-size:22px;transition:all .4s}.btn-chef.served{background:#d97706}@keyframes pan-shake{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg) translateY(-2px)}}@keyframes food-toss{0%{transform:translateY(0) rotate(0);opacity:1}50%{transform:translateY(-15px) rotate(90deg);opacity:1}100%{transform:translateY(0) rotate(180deg);opacity:0}}</style>
Svelte
<script>
  let stage = 'idle';
  function handleClick() { if (stage !== 'idle') return; stage = 'cooking'; setTimeout(() => stage = 'served', 2000); setTimeout(() => stage = 'idle', 4500); }
</script>
<button class="btn-chef" class:is-served={stage==='served'} on:click={handleClick} disabled={stage!=='idle'}>
  <span class="pan" style="opacity: {stage==='cooking'?1:0}">🍳</span>
  <span class="food" style="opacity: {stage==='cooking'?1:0}">🍅</span>
  <span class="dish" style="opacity: {stage==='served'?1:0}; transform: {stage==='served'?'scale(1)':'scale(0)'}">🍝</span>
  <span class="text">{stage==='idle' ? 'Cook' : stage==='cooking' ? 'Cooking...' : 'Served!'}</span>
</button>
<style>
.btn-chef{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-chef .pan{position:absolute;left:15px;font-size:22px;animation:pan-shake .3s infinite}.btn-chef .food{position:absolute;left:25px;top:-20px;font-size:12px;animation:food-toss .6s infinite}.btn-chef .dish{position:absolute;left:15px;font-size:22px;transition:all .4s}.btn-chef.is-served{background:#d97706}@keyframes pan-shake{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg) translateY(-2px)}}@keyframes food-toss{0%{transform:translateY(0) rotate(0);opacity:1}50%{transform:translateY(-15px) rotate(90deg);opacity:1}100%{transform:translateY(0) rotate(180deg);opacity:0}}
</style>
Angular
import { Component } from '@angular/core';
@Component({
  selector: 'app-chef-button',
  template: `<button class="btn-chef" [class.is-served]="stage==='served'" (click)="handleClick()" [disabled]="stage!=='idle'">
    <span class="pan" [style.opacity]="stage==='cooking'?1:0">🍳</span>
    <span class="food" [style.opacity]="stage==='cooking'?1:0">🍅</span>
    <span class="dish" [style.opacity]="stage==='served'?1:0" [style.transform]="stage==='served'?'scale(1)':'scale(0)'">🍝</span>
    <span class="text">{{ stage==='idle' ? 'Cook' : stage==='cooking' ? 'Cooking...' : 'Served!' }}</span>
  </button>`,
  styles: [`.btn-chef{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-chef .pan{position:absolute;left:15px;font-size:22px;animation:pan-shake .3s infinite}.btn-chef .food{position:absolute;left:25px;top:-20px;font-size:12px;animation:food-toss .6s infinite}.btn-chef .dish{position:absolute;left:15px;font-size:22px;transition:all .4s}.btn-chef.is-served{background:#d97706}@keyframes pan-shake{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg) translateY(-2px)}}@keyframes food-toss{0%{transform:translateY(0) rotate(0);opacity:1}50%{transform:translateY(-15px) rotate(90deg);opacity:1}100%{transform:translateY(0) rotate(180deg);opacity:0}}`]
})
export class ChefButtonComponent { stage='idle';handleClick(){if(this.stage!=='idle')return;this.stage='cooking';setTimeout(()=>this.stage='served',2000);setTimeout(()=>this.stage='idle',4500);}}
LWC — HTML template
<template><button class="btn-chef" onclick={handleClick} disabled={disabled}>
  <span class="pan" style={panStyle}>🍳</span><span class="food" style={foodStyle}>🍅</span><span class="dish" style={dishStyle}>🍝</span>
  <span class="text">{label}</span>
</button></template>
LWC — JavaScript
import { LightningElement } from 'lwc';
export default class ChefButton extends LightningElement {
  stage = 'idle';
  get disabled() { return this.stage !== 'idle'; }
  get label() { return this.stage==='idle'?'Cook':this.stage==='cooking'?'Cooking...':'Served!'; }
  get panStyle() { return `position:absolute;left:15px;font-size:22px;opacity:${this.stage==='cooking'?1:0};animation:${this.stage==='cooking'?'pan-shake 0.3s infinite':'none'}`; }
  get foodStyle() { return `position:absolute;left:25px;top:-20px;font-size:12px;opacity:${this.stage==='cooking'?1:0};animation:${this.stage==='cooking'?'food-toss 0.6s infinite':'none'}`; }
  get dishStyle() { return `position:absolute;left:15px;font-size:22px;opacity:${this.stage==='served'?1:0};transform:${this.stage==='served'?'scale(1)':'scale(0)'};transition:all 0.4s`; }
  handleClick() { if(this.stage!=='idle')return;this.stage='cooking';setTimeout(()=>this.stage='served',2000);setTimeout(()=>this.stage='idle',4500); }
}
LWC — CSS
.btn-chef{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-chef.is-served{background:#d97706}@keyframes pan-shake{0%,100%{transform:rotate(0)}50%{transform:rotate(-10deg) translateY(-2px)}}@keyframes food-toss{0%{transform:translateY(0) rotate(0);opacity:1}50%{transform:translateY(-15px) rotate(90deg);opacity:1}100%{transform:translateY(0) rotate(180deg);opacity:0}}
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 Chef Cooking fits

  • Cook Actions
  • Food Apps
  • Recipe Sites
  • Creative Processing

Interaction states & animations

  • Multi-stage
  • Character
  • Shake
  • Toss
  • Reveal

Topics

  • #chef
  • #cooking
  • #pan
  • #food
  • #recipe
  • #kitchen
  • #toss
  • #dish

Accessibility notes

Button auto-resets after 4.5s. Animations pause with prefers-reduced-motion.

Browser support

  • All modern browsers