Component recipes

Component recipe · Claude Design source

Toggle Switch for Claude Design

iOS-style liquid glass toggle switch with glow effect

Component anatomy

iOS-style liquid glass toggle switch with glow effect

{
  "element": "button",
  "baseClasses": [
    "relative",
    "w-12 h-7",
    "bg-white/20",
    "backdrop-blur-xl backdrop-saturate-150",
    "rounded-full",
    "border border-white/30",
    "ring-1 ring-inset ring-white/15",
    "transition-all duration-300 ease-out"
  ]
}

Variants and parameters

Default

Visible

boolean

Interaction states

{
  "active": [
    "[&.active]:bg-[#34C759]/40",
    "[&.active]:border-[#34C759]/50",
    "[&.active]:ring-[#34C759]/30",
    "[&.active]:shadow-[0_0_12px_rgba(52,199,89,0.4)]"
  ]
}

Related base style

Fixed-version source · reviewed before publishingNext component recipe