Skip to content
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

Add ToggleButton and ToggleButtonGroup components #519

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

mkernohanbc
Copy link
Contributor

This PR adds two new components: ToggleButton and ToggleButtonGroup (implemented based on RAC components of the same names.)

A ToggleButton can be toggled between binary states (on/off):

Inactive:
Screenshot 2025-01-20 at 16 50 09

Active:
Screenshot 2025-01-20 at 16 50 42

Multiple buttons can be rendered inside a ToggleButtonGroup to create more complex UIs (for example, choosing between mutually-exclusive options):

Screenshot 2025-01-20 at 16 51 36

Docs and examples are provided in Storybook. Leaving this PR in draft pending design review.

@mkernohanbc mkernohanbc added the enhancement New feature or request label Jan 21, 2025
@mkernohanbc mkernohanbc added this to the Components v0.6.0 milestone Jan 21, 2025
@mkernohanbc mkernohanbc self-assigned this Jan 21, 2025
@mkernohanbc
Copy link
Contributor Author

@Philip-Cheung this is another WIP component I'd like to go over with you later this week.

@mkernohanbc mkernohanbc linked an issue Jan 24, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toggle button (segmented button)
1 participant