feat: Add Select component for form inputs - #34
Draft
noofreuuuh with Copilot wants to merge 3 commits into
Draft
noofreuuuh with Copilot wants to merge 3 commits into
noofreuuuh with Copilot wants to merge 3 commits into
Conversation
- Add Select component with Select.Option compound sub-component - Support placeholder, error message, disabled, fullWidth, size (sm/md/lg) - Reuse component-input tokens for visual consistency with Input - Forward ref to native <select> element - Accessible: aria-invalid, aria-describedby for errors - Add Playwright CT tests - Add Storybook stories - Add Docusaurus examples and documentation
- Add `hidden` attribute to placeholder option to prevent re-selection - Rename SizeValue to SelectSizeValue for consistent naming - Remove type alias in exports
Copilot
AI
changed the title
[WIP] Add Select component for form inputs
feat: Add Select component for form inputs
Jun 4, 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.
The design system lacked a native
<Select>component, forcing consumers to hand-roll styled<select>elements inconsistently. This adds a fully-featuredSelectcomponent aligned with the existingInputvisual contract.Component API
Key design decisions:
onChangereceivesstringdirectly (not aChangeEvent) — matches the expected API from the issueerroris astring(notboolean) — component owns error message display witharia-describedbywiringdisabled hiddenoption — appears in closed state but cannot be re-selectedSelect.Optionis a compound sub-component wrapping native<option>for ergonomic usage<select>elementImplementation
Select.tsx—forwardRefwrapper around native<select>, compound withSelect.OptionSelect.module.css— Reuses--lufa-component-input-*tokens for visual parity withInput; size variants (sm/md/lg) use the same padding/font-size token ladder as the input token setSelect,SelectProps,SelectSizeValueCoverage
onChangevalue delivery,aria-describedbyassociation, visual regression snapshots