Component packs › Gnomon › Lamp Toggle
Turn the lamp on and its head swings down onto the desk, and the light of the whole page moves to it: every Gnomon shadow swings away and stretches long.
Lamp Toggle is a toggle from Gnomon, a component pack with 6 shadow controls: One light for the whole page: switch on the lamp and every control swings its shadow away from it. Price: $2 for the whole pack.
Built with: page-wide light, jointed arm, warm light pool.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | ||
label | string | ||
disabled | boolean | ||
dark | boolean | ||
drivesLight | boolean | true | Move the page light with the lamp. Default true. |
onChange | (on: boolean) => void | ||
autoplay | number | false | Showcase mode: switches every N ms while visible. |
readonly checked: booleansetChecked(on: boolean, silent?: boolean): voiddestroy(): voidimport LampToggle from './LampToggle';
<LampToggle />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Skeuomorphic UI.