Glass Orb Switch

Translucent glass sphere slides on a dark track.

Try it: Click track or orb to toggle light/dark.

Installation

Install with the shadcn CLI:

npx shadcn@latest add https://www.framekitui.live/r/glass-orb-switch.json

Or, with the @framekit namespace registered: npx shadcn@latest add @framekit/glass-orb-switch. You can also copy the source into components/ui/glass-orb-switch.tsx (view on GitHub).

Usage

import { GlassOrbSwitch } from '@/components/ui/glass-orb-switch'

Props

Component props
PropTypeDefaultNotes
checkedboolean—Controlled on/off state.
defaultCheckedbooleanfalseUncontrolled initial state.
onCheckedChange(checked: boolean) => void—Fires when the value flips.
disabledbooleanfalseDisables pointer and keyboard.
  • Cosmic Sparkle Toggle

    OFF/ON pill with a glowing star badge and halo.

  • Day Night Capsule

    Illustrated mini sky that morphs day↔night.

  • Blinker Switch

    Classic switch whose knob blinks like an eyelid.

  • Watchful Eye Toggle

    A soft eye opens and closes; the pupil tracks when open.

  • Mood Dial Toggle

    Tiny face dial springs between two moods.

  • Pull-Cord Lamp Toggle

    A pendant lamp switched by its pull cord: drag the bead down until it clicks, the cord snaps back elastically and sways, the shade rocks on its wire and the bulb warms into a cone of light with…

See all 15 Toggles components