Skip to content

feat: add nebula-toggle component#985

Closed
Sahilmd01 wants to merge 1 commit into
magicuidesign:mainfrom
Sahilmd01:main
Closed

feat: add nebula-toggle component#985
Sahilmd01 wants to merge 1 commit into
magicuidesign:mainfrom
Sahilmd01:main

Conversation

@Sahilmd01

Copy link
Copy Markdown

Description

Adds the Nebula Toggle component—a premium, cosmic theme toggle switch with glowing nebula swirl effects, light/dark transition animations, and local storage state persistence.

Changes

  • Created apps/www/registry/magicui/nebula-toggle.tsx containing the component source code.
  • Created apps/www/registry/example/nebula-toggle-demo.tsx for the component preview.
  • Created apps/www/content/docs/components/nebula-toggle.mdx for documentation and properties reference.
  • Added sidebar navigation link in apps/www/config/docs.ts.
  • Registered component and demo metadata in registry-ui.ts and registry-examples.ts.
  • Generated registry JSON files using the build script.

Motivation

I wanted to add a unique and visually appealing alternative to the standard theme toggle. Nebula Toggle combines smooth light/dark transitions, subtle animations, and a nebula-inspired design to create a more engaging user experience. The component is reusable, customizable, accessible, and ready to use, giving developers another high-quality option for implementing theme switching in their applications.

Breaking Changes

None.

Screenshots

Device / Browser / Viewport: Desktop / Chrome / 1440x812

Light Mode Dark Mode
Light Mode Dark Mode

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@Sahilmd01 is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@Yeom-JinHo
Yeom-JinHo self-requested a review July 12, 2026 04:10
@Yeom-JinHo

Copy link
Copy Markdown
Member

Thanks @Sahilmd01, love the cosmic look!
But I'll hold off merging — it overlaps with our existing animated-theme-toggler and mutates the global dark class + localStorage, which conflicts with the site's next-themes

A purely presentational checked/onChange switch would be much easier to accept — thanks again! 🙏

@Yeom-JinHo Yeom-JinHo closed this Jul 15, 2026
@Sahilmd01

Copy link
Copy Markdown
Author

Thanks for the review and the kind words! I appreciate the feedback.

That makes sense I overlooked the fact that the component should work with next-themes instead of managing the theme state itself. I'll refactor it into a purely presentational component that accepts checked and onCheckedChange props without touching the global dark class or localStorage.

Thanks again for the guidance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants