Component props reference for dash_model_viewer.

API reference

dash_model_viewer

ModelViewer

An interactive 3D model with Augmented Reality support.

proptypedefaultdescription
idstring \dictComponent id for callbacks.
alt *stringAccessible description of the model. Required, and not decorative: it is the only thing a screen-reader user gets.
arbooleanTrueEnable AR and show the AR affordance where supported.
ar_modesstringwebxr scene-viewer quick-lookSpace-separated AR back-ends, most preferred first.
ar_scale'auto' \'fixed'autoWhether AR may rescale the model.
ar_statusstringsession-started, object-placed, failed, ...
ar_trackingstringtracking or not-tracking.
attributesdictRaw kebab-case model-viewer attributes. Read-only props, updated by the component:
cameradict{"orbit", "target", "field_of_view"}. Only user interaction is reported — programmatic changes are suppressed, or a callback that writes camera_orbit would re-trigger itself.
camera_change_debouncenumber100Milliseconds to coalesce camera-change events before updating camera. Do not set this to 0 casually — the event fires at frame rate, so 0 means a callback per frame per viewer.
camera_controlsbooleanTrueLet the user orbit, zoom and pan.
camera_orbitstring"theta phi radius", e.g. "45deg 70deg 2.5m". Two-way: also reported back through camera.
camera_targetstring"X Y Z" in metres, e.g. "0m 1m 0m".
childrenlist of componentsSlot components. Hotspots, a custom AR button, a poster, a progress bar — every one of those is a named slot.
class_namestringCSS class for the viewer element.
field_of_viewstringe.g. "30deg". - min_field_of_view / max_field_of_view (string; optional): Zoom limits. - min_camera_orbit / max_camera_orbit (string; optional): Orbit limits, "auto auto auto" for none.
interpolation_decaynumberCamera transition speed. Lower is slower; 0 is instant. This is what makes a programmatic camera move read as a flight rather than a jump-cut.
max_camera_orbitOptional[str]
max_field_of_viewOptional[str]
min_camera_orbitOptional[str]
min_field_of_viewOptional[str]
model_infodict{"dimensions": {"x","y","z"}, "variants": [...], "animations": [...]}, set on load. Dimensions are in metres — this is the prop that removes the bounding-box maths from user JS.
model_statedict`{"status": "loading" \"loaded" \"error", "progress": float}`.
pick_on_clickbooleanFalseWhen True, clicking the model reports the 3D surface point under the cursor through scene_point.
posterstringImage shown until the model is ready.
scene_pointdict{"position", "normal", "uv"} for the last picked point, when pick_on_click is set.
shadow_intensitynumber0 to 1.
src *stringURL of the .glb / .gltf model.
styledictCSS for the viewer element. It has no intrinsic size — give it one.
tone_mappingstringneutralneutral, aces, agx, commerce, ...
touch_action'pan-y' \'pan-x' \'none'pan-yWhich touch gestures the page keeps rather than the model.
variant_namestringGLTF material variant. None (or "default") selects the model's default.

Slot

A named slot inside a :class:ModelViewer.

proptypedefaultdescription
idstring \dictComponent id for callbacks.
childrenlist of componentsSlot content. Any Dash component.
class_namestringAdded alongside the built-in dmv-slot class.
n_clicksnumber0Increments on click. Use as a callback Input — this is how a hotspot drives a camera move without any clientside JavaScript.
normalstring"X Y Z" surface normal; controls hotspot occlusion behaviour.
positionstring"X Y Z" in model space. Required for hotspots.
slot *stringThe slot name, e.g. "hotspot-1", "ar-button", "poster".
styledictCSS for the slot element.

Note for AI agents: This is the static, prerendered view of an interactive Dash application served because we detected a non-JS user agent. Full prose docs: