STLViewer

Embed Options

Last updated: 2026-06-05

Adding ?embed=true to any /view/:shareId URL switches the viewer into chromeless embed mode — header, footer, and info panel are hidden, leaving only the 3D canvas (and optionally the toolbar). Additional query parameters let you control every meaningful aspect of the rendering without writing JavaScript.

URL form

https://stlviewer.online/view/{shareId}?embed=true&param=value&...

URL conventions

  • Unknown parameters are silently ignored — future params will not break existing embeds.
  • Invalid values fall back to defaults without throwing errors.
  • Boolean parameters accept 1, 0, true, or false.
  • Parameters survive React Router in-viewer navigation and browser back/forward.

Parameter reference

All parameters are optional. Defaults differ between standalone and embed mode.

ParameterValuesStandalone defaultEmbed defaultDescription
axisz | yzzWhich world axis points up. Affects auto-rotation plane and camera orientation.
autoRotateboolean11Whether the model spins continuously on load.
rendersolid | wireframe | xraysolidsolidRender mode.
gridboolean10Floor grid beneath the model.
lightstudio | neutralstudiostudioLighting environment preset.
materialpreset IDNamed material preset. See preset ID list below.
uinone | minimal | fullfullnoneChrome visibility. none = canvas only. minimal = toolbar shown. full = toolbar + side panels.
attributionboolean11Show the 'Powered by STLViewer' badge. false hides badge but keeps favicon + tooltip.

Material preset IDs

Use the preset ID as the value for the material parameter.

color

  • color-blueBlue
  • color-pastel-greenGreen
  • color-pastel-redRed
  • color-pastel-yellowYellow

metal

  • metal-steelSteel
  • metal-copperCopper
  • metal-goldGold
  • metal-aluminiumAluminium
  • metal-chromeChrome

wood

  • wood-oakOak
  • wood-walnutWalnut
  • wood-pinePine

stone

  • stone-marbleMarble
  • stone-graniteGranite
  • stone-concreteConcrete

plastic

  • plastic-whiteWhite
  • plastic-blackBlack

ceramic

  • ceramic-white-glossyPorcelain

Examples

Minimal embed (default settings):

<iframe src="https://stlviewer.online/view/{shareId}?embed=true"
  title="My part" style="width:100%;height:600px;border:0;"
  loading="lazy" allowfullscreen></iframe>

Auto-rotating steel model:

<iframe src="https://stlviewer.online/view/{shareId}?embed=true&material=metal-steel&autoRotate=1"
  title="My part" style="width:100%;height:600px;border:0;"
  loading="lazy" allowfullscreen></iframe>

Static chromeless (no toolbar, no attribution badge):

<iframe src="https://stlviewer.online/view/{shareId}?embed=true&autoRotate=0&attribution=0"
  title="My part" style="width:100%;height:600px;border:0;"
  loading="lazy" allowfullscreen></iframe>