/bubble-tutorials

How to create a 3D product viewer in Bubble

Create a 3D product viewer in Bubble with simple steps, plugins, and tips to boost engagement and showcase products interactively on your 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 create a 3D product viewer in Bubble

A simple and reliable way to create a 3D product viewer in Bubble is to embed an existing 3D viewer library (like Model Viewer by Google or Sketchfab) using an HTML element. Bubble itself cannot render 3D natively, so you load a 3D model file (GLB/GLTF) from your Bubble File Uploader or an external CDN and display it inside the HTML element.

 

Recommended Approach: Use <model-viewer> inside an HTML Element

 

The <model-viewer> web component is the simplest non-technical option because it works directly in an HTML element, supports rotation, zoom, lighting, auto-rotation, annotations, AR mode, and doesn’t require coding skills beyond pasting valid HTML. Bubble supports this because the HTML element simply outputs raw HTML.

  • You upload your 3D file (usually .glb)
  • You store the file URL in your Bubble database
  • You insert an HTML element and reference that dynamic URL

 

Step-by-step Implementation

 

Prepare your database: add a field in your Product data type called model\_file (type: file). Upload a .glb file to it. Then drag the HTML element onto the page and paste code like this:

<script type="module" src="https://unpkg.com/@google/model-viewer/dist/model-viewer.min.js"></script>

<model-viewer
  src="https://yourapp.bubbleapps.io/fileupload/{{Current Page Product's model_file}}"
  camera-controls
  auto-rotate
  shadow-intensity="1"
  style="width:100%; height:400px;">
</model-viewer>

 

Key Notes

 

  • src= must be the dynamic link to your model file. Replace it with Bubble’s dynamic expression, which Bubble will evaluate when rendering the HTML.
  • Bubble may escape dynamic tags unless you check “This HTML is static” off, meaning leave it unchecked.
  • .glb files work best because they load faster and include materials.
  • If you need annotations, AR, or environment lighting, <model-viewer> supports them with attributes.

 

Alternative: Sketchfab Embed (No hosting needed)

 

If you don’t want to host .glb files in Bubble, upload your model to Sketchfab and use their embed code:

<iframe
  src="https://sketchfab.com/models/YOUR_ID/embed"
  style="width:100%; height:400px;"
  frameborder="0">
</iframe>

 

This is secure, works in all browsers, and requires no backend setup.

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