feat: add VscCheckbox component#28
Merged
Merged
Conversation
huimiu
reviewed
May 9, 2026
| ? ('mixed' as const) | ||
| : false; | ||
| const size = | ||
| sizeRow.key === 'small' |
Collaborator
There was a problem hiding this comment.
The CHECKBOX_SIZE_ROWS defines small, medium, large, but VscCheckbox only supports medium | large. Is it expected?
Contributor
Author
There was a problem hiding this comment.
The previous code was misleading. The playground listed a "Small" row but silently mapped it to medium, so both sections rendered identically. I've added proper small support to VscCheckbox with a 14px indicator and 11px label font.
Fluent's Checkbox only supports medium | large, so there is no native small size. We use Omit<CheckboxProps, 'size'> to extend the type with our own 'small' | 'medium' | 'large', map small to Fluent's medium internally, and layer our own CSS overrides on top to achieve the smaller visual.
huimiu
approved these changes
May 11, 2026
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.
Summary
Adds a new
VscCheckboxcomponent that wraps Fluent UI'sCheckboxwith VS Code design tokens.Changes
src/components/Checkbox/VscCheckbox.tsx— Component wrapping FluentCheckboxwithforwardRefsrc/components/Checkbox/useCheckboxStyles.ts— Griffel style hook using--vscode-checkbox-*tokens for all colors/statessrc/components/Checkbox/index.ts— Barrel exportssrc/index.ts— RegistersVscCheckboxandVscCheckboxPropsin the public APItest/VscCheckbox.test.tsx— 8 unit tests (render, ref forwarding, className merge, size variants, disabled, onChange, checked, indeterminate)playground/main.tsx— Checkbox preview section with size × state matrix; addsrowGap/columnGapprops toMatrixcomponentplayground/vscode-tokens.css— Checkbox token definitions for dark/light themes +.vsc-force-focusruleFeatures
medium(default),large--vscode-focusBorderwith6pxoffset--vscode-checkbox-*CSS custom properties with sensible fallbacksTesting