Light as the interaction
Dragging the cord stretches it and springs back; the shade glows, warm light floods the room, and the form springs into view.
Component 044Forms
Pull the cord of a cream mushroom lamp to bathe a dark room in warm light and reveal a frosted glass sign-in card with a gold button.
Quick start
Save lamp-login.tsx in your components folder, then import it below. Use it in a Next.js project with Tailwind CSS.
import LampLogin from "@/components/ui/lamp-login";
export default function LoginPage() {
return <LampLogin />;
}Behind the interaction
Dragging the cord stretches it and springs back; the shade glows, warm light floods the room, and the form springs into view.
Labelled fields, required validation, a signing-in state, error alerts, and a welcome view with sign-out are built in.
Typed onSubmit and onToggle callbacks, a defaultOn option, keyboard-operable cord, inert hidden form, and reduced-motion support.
Keep exploring
A frosted-glass sign-in and sign-up card with chamfered corners. Switching forms melts the content away, slides the two corner tabs together, sends out a ripple, and reveals the new form.
A translucent cyan login panel floats above a glowing projector, beamed up by a pulsing cone of holographic light.
Pull the cord to switch on the light