Skip to content

Pull-Cord Lamp

A hanging lamp with a physics-driven bead chain: pull it to turn on the light and the whole scene switches theme.

Plan
Pro · commercial license
Dependencies
React only
Props
9 (6 adjustable)

Included in Pro and Lifetime. See pricing

Pull the cord

Made with Furin: Pill Nav · Metal Button · Copy Morph

Props

PropTypeDefaultDescription
childrenReactNode""Content that sits under the lamp and catches its light.
onbooleanfalseLight state (controlled mode).
defaultOnbooleanfalseInitial state when not controlled from outside.
onChange(on: boolean) => voidundefinedCalled every time it turns on or off.
colorstring"#ffd9a0"Color of the light.
heightnumber420Scene height, in px.
autobooleanfalsePulls the cord on its own every so often while nobody touches it.
soundbooleanfalseSynthesized switch sound (only after an interaction).
disabledbooleanfalseDisables the lamp.

Installation

With your license

1Set up the Pro registry once

Pro components aren't on npm or in the public shadcn registry: you install them with your license from Furin's private registry.

Use my license

2Install Pull-Cord Lamp

npx shadcn@latest add @furin-pro/pull-cord-lamp

Dependencies

React
18 or later
Other libraries
none
License
commercial

Pro components install into your project: the code is yours and there's nothing else to download.

Keep exploring

  • Code entry with an old rotary telephone dial: drag from the finger hole to the stop and it springs back, with clicks.

    Objects

  • A safe's combination dial: turn it by dragging, each number registers when you hold still on it, and when you get it right the door swings open with a clack.

    Objects

  • A record sleeve from which a vinyl slides out, with grooves and anisotropic reflection; it spins on its own, and dragging across it scratches it: it slows, reverses and returns to speed, with optional synthesized scratch sound.

    Objects