CSS Fire Text

Burning text with stacked yellow, orange and red text-shadows that flicker like real flames.

  • flame
  • burning
  • text-shadow
  • glow
  • flicker
HTML
<h2 class="text-fire">Blaze</h2>
CSS
.text-fire {
  margin: 0;
  padding-top: 0.3em;
  color: #fffbeb;
  font: 900 56px/1 system-ui, sans-serif;
  text-shadow:
    0 0 2px #fde047,
    0 -3px 3px #fde047,
    1px -7px 6px #fb923c,
    -1px -12px 10px #f97316,
    0 -20px 18px #dc2626,
    0 0 30px #7c2d12;
  animation: text-fire-flicker 1.2s ease-in-out infinite alternate;
}

@keyframes text-fire-flicker {
  50% {
    text-shadow:
      0 0 3px #fde047,
      1px -4px 4px #fde047,
      -2px -9px 7px #fb923c,
      2px -15px 12px #f97316,
      -1px -24px 20px #dc2626,
      0 0 34px #7c2d12;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-fire { animation: none; }
}

About this CSS Fire Text

This CSS Fire Text is 30 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses keyframe animations, text shadows and reduced-motion support. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.

CSS features used

Customize it

The colors in this snippet. Search and replace them to match your brand:

  • #fffbeb
  • #fde047
  • #fb923c
  • #f97316
  • #dc2626
  • #7c2d12

How to use this fire text

  1. Copy the HTML and paste it where you want the element to appear.
  2. Copy the CSS into your stylesheet, or inside a <style> tag.
  3. Keep the .text-fire class name, or rename it in both places. Then tweak colors, sizes and timing to match your design.
  4. Using React or Next.js? Change class to className in the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).

Building with an AI tool?

“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.

Feedback