Dev Design Library

Switch

An on/off toggle you can tap, press or drag, with a thumb that stretches under your finger and an optional pending state for saves.

Switch preview
Library
HextaUI
Framework
React
Type
ui
License
MIT
Dependencies
@base-ui/react@^1.8.0, @tabler/icons-react, class-variance-authority, cn
Install
npx shadcn@latest add https://hextaui.com/r/switch.json
Files
  • components/ui/switch.tsx
  • lib/motion.ts
  • components/ui/spinner.tsx
  • hooks/use-delayed-loading.ts
Source
https://github.com/preetsuthar17/hextaui

Categories

More from HextaUI