/bubble-tutorials

How to use SVG in Bubble

Learn how to use SVG in Bubble with simple steps for crisp graphics, flexible icons, and smooth performance in your web app.

Matt Graham, CEO of Rapid Developers

Book a call with an Expert

Starting a new venture? Need to upgrade your web or mobile app? RapidDev builds Bubble apps with your growth in mind.

Book a Free Consultation

How to use SVG in Bubble

The simplest way to use SVG in Bubble is either to paste the SVG code directly into an HTML element, or to upload the SVG file as an image and display it in an Image element. If you need the SVG to be styled or dynamic (like changing colors), the HTML element method is the correct one.

 

Two main ways to use SVG in Bubble

 

Bubble does not have a special “SVG element”, so you use either the HTML element or the Image element. The choice depends on whether you need the SVG to behave like code (editable, color‑changeable) or behave like a static picture.

  • Using HTML element: Best when you want to edit the SVG or style it.
  • Using Image element: Best when SVG is static and you don’t need to modify its colors.

 

Using an SVG inside an HTML element

 

This is the method most Bubble developers use when they want to change fill colors, run conditions, or animate the SVG with CSS. You just copy the raw SVG code and paste it into an HTML element.

<div style="width:40px; height:40px;">
<svg viewBox="0 0 24 24" fill="#4a4a4a">  
  <circle cx="12" cy="12" r="10"></circle>  
</svg>
</div>

 

You can even insert dynamic Bubble data inside the SVG if you need it, for example to change the fill color:

<svg viewBox="0 0 24 24" fill="<span style='display:none;'> </span>">  
  <circle cx="12" cy="12" r="10" fill='{{Parent group's color}}'></circle>  
</svg>

(Bubble lets you place dynamic expressions inside HTML elements.)

 

Using an SVG file as an Image

 

If you upload the SVG file to Bubble’s File Manager, you can display it with an Image element just like PNG or JPG. Bubble serves SVGs correctly, but you cannot change their internal colors because the browser treats them as external files, not inline code.

  • Upload: Go to Data → File Manager → Upload.
  • Display: Use Image element and set the image source to the file’s URL.

 

When each method is best

 

  • Need color changes, animations, conditionally hiding pieces? Use HTML.
  • Just showing an icon or logo with no styling? Use Image.
  • Need performance optimization? Inline SVGs inside HTML load fastest.

Explore More Valuable No-Code Resources

How to integrate Bubble.io with Git?

Learn how to seamlessly integrate Bubble.io with Git through our comprehensive step-by-step guide. Perfect for beginners and professionals.

Explore

How to integrate Bubble.io with Reddit Ads?

Learn how to seamlessly integrate Bubble.io with Reddit Ads using our easy step-by-step guide. Boost your ad management today!

Explore

How to integrate Bubble.io with AWS S3?

Explore our step-by-step guide on integrating Bubble.io with AWS S3, making your app development process more efficient and secure.

Explore

How to integrate Bubble.io with Lucidchart?

Follow our step-by-step guide to seamlessly integrate Bubble.io with Lucidchart, enhancing your workflow & productivity.

Explore

How to integrate Bubble.io with Kentico?

Learn how to seamlessly integrate Bubble.io and Kentico with our comprehensive, easy to follow step-by-step guide.

Explore

How to integrate Bubble.io with Box?

Discover easy-to-follow steps for integrating Bubble.io with Box. Boost your workflow and secure your files seamlessly today.

Explore

Stuck in Bubble.io? We’re here to help!

Fix broken workflows | Optimize logic | Boost performance | Scale with confidence

4.9
Clutch rating 🌟
600+
Happy partners
17+
Countries served
190+
Team members

By clicking “Accept”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Privacy Policy for more information.

Cookie preferences