Repository navigation
Form controls: 36px single-line height and consistent thin focus (2.6.0) - #129
Merged
Merged
Conversation
Single-line inputs had no fixed height (py-2 + leading-5 + border = 38px), so they sat 2px taller than the default h-9 Button, and their height shifted with @tailwindcss/forms and stylesheet order. InputField, TextInput, the add-on / animated-label inputs, NestedInputButton, TextInputSelect, Select, Combobox and the DropdownWithMultiSelect trigger are now a fixed h-9. Focus on text inputs and select triggers is a single 1px violet-700 border. The ring is zeroed with focus:!ring-0 because a plain focus:ring-0 ties with the forms plugin's focus rule and loses when a consumer's forms styles load after plenum's. Error and readonly borders are kept on focus. Button, both ButtonDropdown halves, Capsule, ToggleSwitch, Checkbox and Radio show their focus ring for keyboard focus only (focus-visible), not on click. Adds a Form Control States story, tests for the new classes, a changelog entry, and bumps the version to 2.6.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
jules-exel
approved these changes
Sep 28, 2026
This branch was successfully deployed
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.
Makes single-line form controls line up with the default Button, and makes focus thin and consistent. This is a visual change to every consumer form: inputs get 2px shorter and focus styles change. Version bumped to 2.6.0.
Height: every single-line control is now 36px (
h-9)Inputs had no fixed height.
py-2+leading-5+ a 1px border made them 38px, next to theh-9(36px) Button. Their height also depended on@tailwindcss/formsand stylesheet order: 22–24px without forms, 42px when a consumer's forms styles load after plenum's. Heights below were measured in headless Chrome in all three setups.InputField/TextInput(incl. date, datetime-local)FormInputWithAddons,AnimatedLabelInput,AnimatedFormInputWithAddonsNestedInputButton(add-on segment)TextInputSelectinput + native<select>Select(height set on the bordered wrapper)ComboboxDropdownWithMultiSelecttriggerThe floating labels in the animated inputs moved from
top-[9px]totop-[8px]to stay centred.Focus
violet-700border, for keyboard and mouse.InputFieldalready hadfocus:ring-0, but it ties with the forms plugin's focus rule on specificity, so it lost when the consumer's forms CSS loaded later (violet border plus a 1px blue ring). It now usesfocus:!ring-0 focus:outline-none, so it looks right with or without forms, in any load order.Select's deliberate 2px (focus-within:ring-1) is now the same 1px border.TextInputandTextInputSelectnow setaria-invalidwhenisErroris set.Button, both halves ofButtonDropdown,Capsule,ToggleSwitch,Checkbox,Radio: the 2px purple ring now shows onfocus-visibleonly. It still shows for keyboard focus (WCAG 2.4.7) but no longer on mouse click.NestedInputButtonand the multi-select trigger show the violet border for keyboard focus.<focus-visible:!></focus-visible:!>…class strings inButtonasLinkandCapsule.Intentionally unchanged
TextArea/AnimatedLabelTextArea: out of scope. They are now the only controls with a 2px focus left.Badgerings and the genericDropdowntrigger: not form controls.Testing
InputField.test.tsxandFormControlConsistency.test.tsx. They check the height and focus classes across all the controls, and fail against the previous code (31 of 38).yarn test: 101 passed.tsc --noEmit: clean.yarn build: clean.After release
The Manager App can remove its local overrides:
h-9inLinkedContentLink.tsxandfocus:ring-0inSearchListBox.tsx.🤖 Generated with Claude Code