Skip to content

docs: add missing toggle documentation page#3083

Open
Copilot wants to merge 4 commits intomainfrom
copilot/add-toggle-documentation-page
Open

docs: add missing toggle documentation page#3083
Copilot wants to merge 4 commits intomainfrom
copilot/add-toggle-documentation-page

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

📝 Description

The @zag-js/toggle machine exists in the codebase and is used by Ark UI, but has no documentation page on zagjs.com. This adds the full docs page.

⛳️ Current behavior (updates)

Toggle Group has a docs page at /components/toggle-group, but the standalone Toggle machine (@zag-js/toggle) has no documentation despite being a published package.

🚀 New behavior

Adds /components/toggle documentation page with:

  • MDX docs page — usage, controlled/uncontrolled state, disabled, programmatic control, styling guide, API/context/data-attr tables, accessibility notes
  • Framework snippets — installation and usage for React, Solid, Svelte, Vue
  • Interactive demo — playground with <Toggle> component and CSS module
  • Anatomy icon — SVG showing root + indicator parts, registered in @zag-js/anatomy-icons
  • Sidebar entry — added before "Toggle Group" in nav

All existing @zag-js/docs data (API, context, data attributes) for toggle was already generated — this PR just wires it into the website.

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

The packages/docs/data/*.json files were regenerated by the standard pnpm build postbuild step. The diff there is unrelated type annotation updates from the current codebase state.

Copilot AI linked an issue Apr 15, 2026 that may be closed by this pull request
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 15, 2026

⚠️ No Changeset found

Latest commit: b8f1205

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

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
zag-nextjs Ready Ready Preview Apr 17, 2026 0:49am
zag-solid Ready Ready Preview Apr 17, 2026 0:49am
zag-svelte Ready Ready Preview Apr 17, 2026 0:49am
zag-vue Ready Ready Preview Apr 17, 2026 0:49am
zag-website Error Error Apr 17, 2026 0:49am

Request Review

…bar entry

Agent-Logs-Url: https://github.com/chakra-ui/zag/sessions/0c6801b7-f979-45b5-a0ad-b195f3205bef

Co-authored-by: anubra266 <30869823+anubra266@users.noreply.github.com>
@segunadebayo segunadebayo marked this pull request as ready for review April 17, 2026 12:48
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.

Missing documentation page for Toggle

3 participants