-
Notifications
You must be signed in to change notification settings - Fork 20
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 indeterminate support to <Checkbox />
#479
Labels
enhancement
New feature or request
rfc:accepted
Flag an RFC as accepted
rfc
An issue proposing a new significant change
Milestone
Comments
Grab the svg (and add it as a new |
Closing, I'm not aware of anywhere that we currently need this and we can create a new issue if needed later. |
chornonoh-vova
added a commit
that referenced
this issue
Aug 7, 2024
chornonoh-vova
added a commit
that referenced
this issue
Aug 8, 2024
chornonoh-vova
added a commit
that referenced
this issue
Aug 13, 2024
* feat(react): add indeterminate support to checkbox Refs: #479 * fix: code review comments Refs: #479 * fix: update icon type import Co-authored-by: Jason <jason@scurker.com> * fix(styles): colors for checkbox indeterminate state * fix: update checkbox indeterminate screenshots --------- Co-authored-by: Jason <jason@scurker.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New feature or request
rfc:accepted
Flag an RFC as accepted
rfc
An issue proposing a new significant change
The indeterminate state is the state of a checkbox where the checked value of the checkbox cannot be determined.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#attr-indeterminate
Design Specs
Note: The designs originated from UXPin and the links are no longer accessible but the concepts are still applicable. Please note the proposed design does not match the current size of checkboxes and this is intentional.
Dark mode
Light mode
No new icons are needed for this checkbox, the indeterminate state can be rendered purely with CSS, approximate styles below:
Technical Details
For more context, this github comment thread for react provides specific details about implementation challenges with indeterminate checkboxes. The HTML spec does not allow for indeterminate properties to be set via an attribute, so it must be set via javascript.
The
checked
andindeterminate
properties are incompatible, so we need to define the default behavior of what happens to the checkbox when it becomesindeterminate
in either its checked or unchecked state.The text was updated successfully, but these errors were encountered: