id | string \ | dict | | Component id for callbacks. |
alt * | string | | Accessible description of the model. Required, and not decorative: it is the only thing a screen-reader user gets. |
ar | boolean | True | Enable AR and show the AR affordance where supported. |
ar_modes | string | webxr scene-viewer quick-look | Space-separated AR back-ends, most preferred first. |
ar_scale | 'auto' \ | 'fixed' | auto | Whether AR may rescale the model. |
ar_status | string | | session-started, object-placed, failed, ... |
ar_tracking | string | | tracking or not-tracking. |
attributes | dict | | Raw kebab-case model-viewer attributes. Read-only props, updated by the component: |
camera | dict | | {"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_debounce | number | 100 | Milliseconds 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_controls | boolean | True | Let the user orbit, zoom and pan. |
camera_orbit | string | | "theta phi radius", e.g. "45deg 70deg 2.5m". Two-way: also reported back through camera. |
camera_target | string | | "X Y Z" in metres, e.g. "0m 1m 0m". |
children | list of components | | Slot components. Hotspots, a custom AR button, a poster, a progress bar — every one of those is a named slot. |
class_name | string | | CSS class for the viewer element. |
field_of_view | string | | e.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_decay | number | | Camera 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_orbit | Optional[str] | | |
max_field_of_view | Optional[str] | | |
min_camera_orbit | Optional[str] | | |
min_field_of_view | Optional[str] | | |
model_info | dict | | {"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_state | dict | | `{"status": "loading" \ | "loaded" \ | "error", "progress": float}`. |
pick_on_click | boolean | False | When True, clicking the model reports the 3D surface point under the cursor through scene_point. |
poster | string | | Image shown until the model is ready. |
scene_point | dict | | {"position", "normal", "uv"} for the last picked point, when pick_on_click is set. |
shadow_intensity | number | | 0 to 1. |
src * | string | | URL of the .glb / .gltf model. |
style | dict | | CSS for the viewer element. It has no intrinsic size — give it one. |
tone_mapping | string | neutral | neutral, aces, agx, commerce, ... |
touch_action | 'pan-y' \ | 'pan-x' \ | 'none' | pan-y | Which touch gestures the page keeps rather than the model. |
variant_name | string | | GLTF material variant. None (or "default") selects the model's default. |