Toggle Sidebar B
AppearanceLight & dark mode D

Lanyard

Swinging 3D lanyard / badge card with realistic inertial motion.

Default

Grab the card and drag it around, then let go and watch it swing on its band. Use the controls to move the camera or switch gravity off.

Dark previewReplay previewOpen in new tab

Drag It!

Customize

Camera Distance24

API Reference

Lanyard

PropTypeDefaultDescription
positionnumber[][0, 0, 30]Initial camera position for the canvas.
gravitynumber[][0, -40, 0]Gravity vector for the physics simulation.
fovnumber20Camera field of view.
transparentbooleantrueEnables a transparent background for the canvas.
frontImagestringnullCustom image URL for the card's front face. Falls back to the model's built-in texture when not set.
backImagestringnullCustom image URL for the card's back face, rendered independently from the front.
imageFit'cover' | 'contain''cover'How a custom front or back image fits its face. Both preserve aspect ratio; 'cover' fills and crops, 'contain' letterboxes.
lanyardImagestringnullCustom image URL for the lanyard band's repeating texture. Falls back to the default band texture when not set.
lanyardWidthnumber1Width of the lanyard band. Increase it to give a custom band image more room and reduce stretching.
modelUrlstring'/previews-assets/lanyard/card.glb'URL of the card model. It needs the card, clip and clamp nodes and the base and metal materials. Host card.glb and lanyard.png from your own public folder.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • The card is pointer driven and decorative. Put anything that matters in surrounding text.