Add Checkbox component with documentation and stories#59
Merged
Conversation
- Add Checkbox component built on Radix UI primitives - Support default and secondary variants - Include comprehensive Storybook stories with examples - Add detailed README documentation with usage examples - Support checked, unchecked, indeterminate, and disabled states - Install @radix-ui/react-checkbox dependency - Export Checkbox from main UI index Co-Authored-By: Tomek Drwięga <tomusdrw+github@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for fluffy-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
tomusdrw
approved these changes
Nov 6, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Checkbox component with documentation and stories
Summary
This PR adds a new Checkbox component to the shared-ui library. The component is built on Radix UI's checkbox primitive and follows the established patterns from other components like Switch and Button. It includes two visual variants (default and secondary), supports all standard checkbox states (checked, unchecked, indeterminate, disabled), and integrates with the library's theme system for automatic light/dark mode adaptation.
The implementation includes:
@radix-ui/react-checkbox@^1.3.3Review & Testing Checklist for Human
This is a new UI component that needs visual and functional verification:
Visual testing in Storybook - Run
npm run devand navigate to UI/Checkbox. Verify all variants look correct in both light and dark modes. Pay special attention to:Indeterminate state rendering - Verify the indeterminate state displays correctly (should show a dash/minus icon). Test the "SelectAllPattern" story to see this in action.
Keyboard accessibility - Tab to the checkbox and verify:
Consider unit tests - I noticed Input and Textarea have test files, but Switch doesn't. Should this component have unit tests beyond Storybook stories?
Test Plan
npm run devNotes
Link to Devin run: https://app.devin.ai/sessions/2e16ae97462e42ceb1dc53703ce1d2c9
Requested by: Tomek Drwięga (@tomusdrw)