Skip to content

feat(cli): add installable mode-toggle component#230

Open
AMDphreak wants to merge 1 commit into
stefan-karger:mainfrom
AMDphreak:feat/mode-toggle-cli-component
Open

feat(cli): add installable mode-toggle component#230
AMDphreak wants to merge 1 commit into
stefan-karger:mainfrom
AMDphreak:feat/mode-toggle-cli-component

Conversation

@AMDphreak
Copy link
Copy Markdown

Summary

The docs site already ships a light/dark/system theme dropdown (ModeToggle) used in the navbar and dark-mode guides, but it only existed as an example registry entry. The CLI filters add to type: ui, so users could not install it and kept copy-pasting from the docs.

This PR:

  • Adds registry/ui/mode-toggle.tsx (same UX as the docs navbar; lucide-solid icons)
  • Registers mode-toggle in registry-ui.ts with registryDependencies: [button, dropdown-menu]
  • Deduplicates docs components/mode-toggle and example/mode-toggle to re-export the UI component
  • Updates dark-mode docs: npx solidui-cli@latest add mode-toggle

Maintainer checklist

  • Run pnpm build:registry in apps/docs and deploy registry JSON to solid-ui.com
  • Publish CLI if registry hosting is tied to releases

Test plan

  • pnpm build:registry in apps/docs
  • Fresh SolidStart app: solidui-cli init, solidui-cli add mode-toggle, wire ColorModeProvider per docs
  • Verify light / dark / system modes and SSR cookie script on SolidStart

Promote the docs site theme switcher to a first-class registry entry so
`solidui-cli add mode-toggle` pulls button and dropdown-menu deps and
installs light/dark/system switching without copy-paste from examples.

Uses lucide-solid icons (already credited in NOTICE). Update dark-mode
docs to reference the single add command.

Maintainers: run `pnpm build:registry` in apps/docs before release.
Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

@AMDphreak is attempting to deploy a commit to the Stefan EK's projects Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 15, 2026

⚠️ No Changeset found

Latest commit: 17d43fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

1 participant