Smart Light, animated React component
A light control with a real room behind it. Drag the pill to dim the glass pendant, slide from amber to cool white, or tap a scene: the bulb, the wall falloff and the shadows all respond, and the lamp sways. Canvas lighting with pointer and keyboard control.
- Pro
- Inputs & Controls
Clicks like a relay when the light goes on or off, taps glass as you dim, ticks like wood along the warmth slider, chimes when you pick a scene, and thuds softly at the end of the dimmer. Sound is off on this site until you switch it on.
Play with it
Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.
Living Room
Pendant Light
Brightness
OffDrag the pill or use the arrow keys. Tap a scene to set the mood.
Props
| Prop | Type | Default | What it does |
|---|---|---|---|
| autoplay | boolean | false | Plays itself with a ghost pointer until the visitor touches it. Off by default, so a copied component reacts only to the visitor. Never runs under reduced motion. |
| className | string | — | Extra classes for the outer card. |
| enableSound | boolean | true | Plays interface sounds on interaction. They follow the sound switch (setSoundsEnabled, on by default) and stay silent on hover. Autoplay makes the same sounds once the visitor has used the page. Pass false to silence this component. |
Smart Light questions
Does it make sound, and how do I turn it off?
Clicks like a relay when the light goes on or off, taps glass as you dim, ticks like wood along the warmth slider, chimes when you pick a scene, and thuds softly at the end of the dimmer. Sounds are synthesised with the Web Audio API, so there are no audio files, and they only play after a click or key press. Pass `enableSound={false}` to silence this component, or call `setSoundsEnabled(false)` from `@/lib/ui-sounds` to switch every sound off at once. The CLI installs `@/lib/ui-sounds` with the component.