Glass ToggleOn/off toggles with glass housing and liquid-feel spring animation.

Buttons & TogglesGlassSettingsDashboardTheme switcher

Preferences

Dark ModeOn
NotificationsOn
Auto-UpdateOff
AnalyticsOff
Haptic FeedbackOn

Add to your project

One command adds this component to your project.

1

Run the following command. New project? Run npx shadcn@latest init first to set up Tailwind and path aliases.

npx shadcn@latest add @aicanvas/glass-toggle
2

For dark mode, add the dark class to your <html> element:

Optional
<html class="dark">

Install with AI Canvas MCP

With AI Canvas MCP, your AI knows every component we ship. Ask for “a navigation component from AI Canvas” inside Claude Code, Codex, or Cursor and it can suggest you a few options, then install the one you like. Less typing, lower token cost, modern way to build.

Get MCP

About Glass Toggle

Glass Toggle is an on/off switch housed in a frosted glass track, with a thumb that glides on a soft Motion spring while the track color transitions smoothly between states. The glass surface picks up the page behind it through backdrop-filter, so it always feels consistent with whatever you put under it. Drop it into glassmorphism dashboards, settings panels, theme switchers, or any UI that already leans on the same visual language for cards and modals.

Built with

MotionTailwind CSS

More like this