-
-
Notifications
You must be signed in to change notification settings - Fork 367
feat: toggle group #3929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: toggle group #3929
Conversation
🦋 Changeset detectedLatest commit: d56be03 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a new Toggle Group component for the Skeleton UI library, providing grouped buttons for toggling option states using Zag.js as the underlying state management.
Key Changes
- Adds Toggle Group component implementation for both Svelte and React frameworks
- Integrates @zag-js/toggle-group dependency for state management and accessibility
- Provides comprehensive documentation and playground examples
Reviewed Changes
Copilot reviewed 35 out of 36 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-workspace.yaml | Adds @zag-js/toggle-group dependency to the workspace catalog |
| packages/skeleton-common/src/classes/toggle-group.ts | Defines CSS classes and styling for the toggle group component |
| packages/skeleton-svelte/src/components/toggle-group/* | Implements Svelte version with provider pattern and anatomy components |
| packages/skeleton-react/src/components/toggle-group/* | Implements React version with hooks and context providers |
| sites/skeleton.dev/src/content/docs/components/toggle-group/* | Adds documentation pages for both frameworks |
| playgrounds/* | Provides working examples for testing both implementations |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/skeleton-svelte/src/components/toggle-group/anatomy/root.svelte
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 35 out of 36 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 35 out of 36 changed files in this pull request and generated 3 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
packages/skeleton-svelte/src/components/toggle-group/anatomy/root.svelte
Show resolved
Hide resolved
packages/skeleton-react/src/components/toggle-group/anatomy/item.tsx
Outdated
Show resolved
Hide resolved
packages/skeleton-svelte/src/components/toggle-group/anatomy/item.svelte
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 35 out of 36 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 39 out of 40 changed files in this pull request and generated 11 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
sites/skeleton.dev/src/components/examples/components/toggle-group/svelte/default.svelte
Outdated
Show resolved
Hide resolved
| <BoldIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="italic"> | ||
| <ItalicIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="underline"> | ||
| <UnderlineIcon className="size-4" /> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'class' instead of 'className' in Svelte components to ensure styles are applied.
| <BoldIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon className="size-4" /> | |
| <BoldIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon class="size-4" /> |
| <BoldIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="italic"> | ||
| <ItalicIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="underline"> | ||
| <UnderlineIcon className="size-4" /> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'class' instead of 'className' in Svelte components.
| <BoldIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon className="size-4" /> | |
| <BoldIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon class="size-4" /> |
| <BoldIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="italic"> | ||
| <ItalicIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="underline"> | ||
| <UnderlineIcon className="size-4" /> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'class' instead of 'className' in Svelte components so the icon receives the expected styling.
| <BoldIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon className="size-4" /> | |
| <BoldIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon class="size-4" /> |
sites/skeleton.dev/src/components/examples/components/toggle-group/svelte/dir.svelte
Outdated
Show resolved
Hide resolved
| <BoldIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="italic"> | ||
| <ItalicIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="underline"> | ||
| <UnderlineIcon className="size-4" /> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Svelte, use 'class' instead of 'className' to style components.
| <BoldIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon className="size-4" /> | |
| <BoldIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon class="size-4" /> |
sites/skeleton.dev/src/components/examples/components/toggle-group/svelte/controlled.svelte
Outdated
Show resolved
Hide resolved
| <BoldIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="italic"> | ||
| <ItalicIcon className="size-4" /> | ||
| </ToggleGroup.Item> | ||
| <ToggleGroup.Item value="underline"> | ||
| <UnderlineIcon className="size-4" /> |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replace 'className' with 'class' in Svelte.
| <BoldIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon className="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon className="size-4" /> | |
| <BoldIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="italic"> | |
| <ItalicIcon class="size-4" /> | |
| </ToggleGroup.Item> | |
| <ToggleGroup.Item value="underline"> | |
| <UnderlineIcon class="size-4" /> |
playgrounds/skeleton-svelte/src/routes/components/toggle-group/+page.svelte
Outdated
Show resolved
Hide resolved
…/+page.svelte Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…roup/svelte/controlled.svelte Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…roup/svelte/dir.svelte Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…roup/svelte/default.svelte Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 39 out of 40 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 41 out of 42 changed files in this pull request and generated 4 comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Linked Issue
Closes -
Description
Implements the Toggle Group component
Checklist
Please read and apply all contribution requirements.
docs/,feature/,chore/,bugfix/mainbranchpnpm checkin the root of the monorepopnpm formatin the root of the monorepopnpm lintin the root of the monorepopnpm testin the root of the monorepo/packageprojects, please supply a ChangesetChangesets
View our documentation to learn more about Changesets. To create a Changeset:
pnpm changesetand follow the prompts