How can I add animated SVG icons, illustrations, and business logos to my website using Webflow?

TL;DR
  • Use the Lottie element for JSON-based SVG animations and control playback settings directly in Webflow.  
  • Paste inline SVG with CSS/SMIL into an Embed component for full animation control via custom styling or Webflow Interactions.  
  • Add JS-based animations (e.g., GSAP) by embedding SVGs and required scripts using the Embed element and Site Settings.  
  • Avoid using SVGs as static image files if animations don’t render—embedding provides better support.

You can add animated SVG icons, illustrations, and business logos to your Webflow site using several methods depending on how the SVG is animated—CSS, JavaScript, or native SVG animations.

1. Prepare Your Animated SVG

  • Ensure your SVG is optimized and cleaned up using tools like SVGOMG or Illustrator’s “Save As SVG” feature.
  • If animations are part of the SVG code (e.g., using CSS or SMIL inside the SVG), make sure they are embedded correctly.
  • For JavaScript-driven animations (e.g., via Lottie), you’ll need to use specific embed methods.

2. Use Webflow’s Built-In Lottie Integration (for Lottie SVG Animations)

  • Go to Add Panel (press A) and drag the Lottie Animation element into your design.
  • Upload your JSON file (converted SVG via After Effects + Bodymovin plugin).
  • Use the Lottie element settings to control playback type (scroll-based, click-based, loop, etc.).

3. Embed Inline SVG (With CSS or SMIL Animation)

  • Copy the SVG markup and paste it into a Webflow Embed element.
  • Open Add Panel → Drag in an Embed component → Paste the SVG code inside.
  • You can style or animate the elements using custom CSS within the <style> tag inside the Embed, or via Settings > Custom Code if global.

Important: Webflow strips <style> and certain tags in rich text and image elements—embed is the safest method.

4. Upload SVG as an Image (Limited Animation Support)

  • Go to Assets panel and upload your .svg file.
  • Drag the image into the canvas.
  • Note: If animation is embedded via SMIL or internal CSS, some browsers may restrict it due to being loaded as an external file.

5. Animate SVG Using Webflow Interactions

  • Upload an SVG image and place it as a static image or Embed element.
  • Select the SVG element and choose Interactions from the right panel.
  • Set On Page LoadScroll Into View, or Mouse Hover triggers.
  • Use transformopacityrotation, etc. to animate the SVG.
  • Works best when the SVG is embedded directly (not as an image), so individual elements can be targeted.

6. JavaScript-Based Animation Libraries (e.g., Vivus, GSAP)

  • Add the animation library in Site Settings → Custom Code → Head section.
  • Place your SVG via an Embed element.
  • Add a <script> tag right after the SVG (inside the Embed or in Page Footer) to trigger the animation.

Example: to use GSAP, include the CDN link and reference classes or IDs inside the SVG.

Summary

To add animated SVGs in Webflow:

  • Use the Lottie element for JSON-based SVG animations.
  • Use the Embed component for CSS/SMIL-based inline SVGs.
  • Add custom JS animation, if needed, by embedding script tags and required libraries.
  • Avoid using uploaded SVGs as static images if the animation isn't working—they may not render dynamically.

Using Embed and Lottie gives you the most control and animation compatibility inside Webflow.

Rate this answer

Other Webflow Questions