Pull Cord - React Component | Kokonut UI

Pull Cord

A lamp switch you pull on a swinging cord, built with React and a rope simulation.

Installation

Pull Cord is a free, open-source React component in the Kokonut UI Buttons collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/pull-cord.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/pull-cord

Usage

import PullCord from "@/components/kokonutui/pull-cord";

export default function Example() {
  return <PullCord />;
}

Props

checked

defaultChecked

onCheckedChange

label

className

Dependencies

Needs Version Comes from
cn from lib/utils.ts shadcn init
React 19 Your app
Tailwind CSS 4 Your app

No provider, font or global CSS to set up: the file works as soon as it lands.