-
-
Couldn't load subscription status.
- Fork 2k
feat(checkbox) : add checkbox component with all interaction states #5714
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
base: v3
Are you sure you want to change the base?
Conversation
|
|
@ShobhitPatra is attempting to deploy a commit to the HeroUI Inc Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. ✨ Finishing touches🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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 complete checkbox component with comprehensive interaction states including hover, pressed, focus, error, and disabled states. The implementation moves styling from Tailwind variants to CSS classes and integrates React Aria state management.
- Adds full CSS styling for all checkbox interaction states (hover, pressed, focus, error, disabled)
- Updates React component to properly expose and use interaction state data attributes
- Refactors stories to use CSS classes instead of data attributes for visual state demonstration
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/styles/components/index.css | Imports the new checkbox CSS file |
| packages/styles/components/checkbox.css | Complete CSS implementation for all checkbox states |
| packages/react/src/components/checkbox/checkbox.tsx | Updates context and component to expose interaction states via data attributes |
| packages/react/src/components/checkbox/checkbox.styles.ts | Simplifies styles to use CSS classes instead of Tailwind variants |
| packages/react/src/components/checkbox/checkbox.stories.tsx | Updates story examples and title |
| packages/react/src/components/checkbox/checkbox-group.stories.tsx | Updates story title |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @apply relative inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-[5px] shadow-[0px_1px_2px_0px_rgba(0,0,0,0.05)] transition-all duration-200; | ||
|
|
||
| /* default unselected state */ | ||
| @apply bg-surface-3 border-border/10 border; |
Copilot
AI
Sep 17, 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.
The CSS class bg-surface-3 is being used but this doesn't match the original Tailwind class bg-default from the styles file. This could cause visual inconsistencies.
| @apply bg-surface-3 border-border/10 border; | |
| @apply bg-default border-border/10 border; |
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.
@jrgarciadev I think bg-surface-3 works better.Though, happy to make any changes .
bg-default
bg-surface-3
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hey @ShobhitPatra thanks!, did you follow the Figma design? https://www.figma.com/community/file/1546526812159103429/heroui-figma-kit-v3 I see a lot of differences |
|
Hi @jrgarciadev, thanks for the feedback! I want to make sure I get this right. Could you help me understand specifically what differs from the Figma design? I've been working from the checkbox states shown in the kit, but I'm clearly missing something important. I'd rather ask for guidance now than continue in the wrong direction. Thanks for your patience! |
📝 Description
Implement complete checkbox component with all interaction states including hover, pressed, focus, error, and disabled states. Added proper CSS styling and React Aria state management integration
⛳️ Current behavior (updates)
🚀 New behavior
💣 Is this a breaking change (Yes/No):
📝 Additional Information