references

reference

React Bits

An open source collection of high quality, animated, interactive & fully customizable React components for building stunning, memorable user interfaces.

planted
25 Sept 2025
by
David Haz
reading
1 min

Model Viewer

Fast as lightning.

Customize

Model

Environment

Horizontal Offset

0.5

Vertical Offset

0

Mouse Parallax

Hover Rotation

Screenshot Button

Fade In On Load

Auto Rotate

Rotate Speed

0.35

Props

PropertyTypeDefaultDescription
urlstring-URL of the 3D model file (glb/gltf/fbx/obj)
widthnumber | string400Width of the canvas container
heightnumber | string400Height of the canvas container
modelXOffsetnumber0Horizontal offset of the model
modelYOffsetnumber0Vertical offset of the model
defaultRotationXnumber-50Initial rotation on the X axis in degrees
defaultRotationYnumber20Initial rotation on the Y axis in degrees
defaultZoomnumber0.5Initial zoom distance factor
minZoomDistancenumber0.5Minimum zoom distance
maxZoomDistancenumber10Maximum zoom distance
enableMouseParallaxbooleantrueEnable mouse-based parallax effect
enableManualRotationbooleantrueEnable manual rotation via drag
enableHoverRotationbooleantrueEnable rotation on hover based on cursor
enableManualZoombooleantrueEnable manual zoom via mouse wheel or gestures
ambientIntensitynumber0.3Intensity of ambient light
keyLightIntensitynumber1Intensity of key light
fillLightIntensitynumber0.5Intensity of fill light
rimLightIntensitynumber0.8Intensity of rim light
environmentPresetstring"forest"Environment preset for scene lighting
autoFramebooleanfalseAutomatically frame the model in view
fadeInbooleanfalseEnable fade-in transition on load
autoRotatebooleanfalseEnable automatic rotation animation
autoRotateSpeednumber0.35Speed of automatic rotation
showScreenshotButtonbooleantrueShow the screenshot button overlay
placeholderSrcstring-Placeholder image source while loading
onModelLoadedfunction-Callback when model finishes loading

Dependencies

three @react-three/fiber @react-three/drei