Skip to content

Add a 32px field size (xxs) for toolbars - #229

Merged
lorant-one merged 4 commits into
previewfrom
feat/input-small-size
Oct 18, 2026
Merged

lorant-one merged 4 commits into
previewfrom
feat/input-small-size

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Before: Input and every field built on it could go no lower than 40px (size="xs", as tall as an m Button). So a dashboard toolbar couldn't be all small controls: a search field or status filter stood 8px taller than the size="s" buttons beside it.

After: size="xxs" gives a 32px field, the same height as a small Button.

  • Look: radius-m, a 12px text inset, and the prefix and suffix 8px in.
  • Where: Input, Textarea, Select (including its search field), NumberInput (steppers side by side), DateInput, DateRangeInput, PasswordInput, ColorInput and TagInput, and through Form size="xxs".
  • Label: a 32px field has no room for a floating label, so at xxs the label shows as the placeholder. A hidden <label> keeps it as the field's accessible name.

Existing sizes and the m default are unchanged. Each docs page gets a toolbar example, and field-size-xxs.test.tsx covers the classes and heights.


Generated by Claude Code

Field heights run a step above the button scale (xs 40px, s 48px, m 56px),
so a dashboard toolbar could not be all small controls: the shortest field
was as tall as an m Button. xxs is 32px, the height of a size="s" Button.

- New `FieldSize` type (`TShirtSizes | "xxs"`) on Input, Textarea, Form and
  the field context; Select, NumberInput, DateInput, DateRangeInput,
  PasswordInput, ColorInput and TagInput take it through Input.
- xxs: body-s type, 12px text inset, radius-m, prefix/suffix 8px in, as a
  small Button. No touch height floor.
- No floating label at xxs: `label` shows as the placeholder (unless one is
  set) and stays the accessible name through a visually hidden <label>.
  ColorInput, which draws no placeholder, shows it in its text overlay.
- A searchable xxs Select opens an xxs search field (s otherwise, as before);
  NumberInput puts its steppers side by side; Textarea's inset floor drops to
  0 so its first line fits 32px; a stacked Form at xxs rounds at radius-m.
- Existing sizes and the m default are unchanged.

Docs: a toolbar-size example on the Input, Select, Textarea, Form,
NumberInput, DateInput, DateRangeInput, PasswordInput, ColorInput and
TagInput pages. AI harness: `field.size` gotcha, FieldSize listed in the
spec's token aliases (generated artifacts left for the release regen).
Tests: field-size-xxs.test.tsx.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
@vercel

vercel Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
core-docs Ignored Ignored Preview Oct 18, 2026 6:38pm UTC

…dration

CI's check:render failed on this branch with React #418 (a hydration text
mismatch) at load, on /contexts/themeProvider and, on the rerun, on
/modules/codeBlock: a race, not a page.

Prism highlights every code[class*="language-"] in the document a frame
after its module evaluates, unless Prism.manual is set beforehand. A
CodeBlock imports Prism once it hydrates; the automatic pass then reached
the server-rendered CodeBlocks still waiting to hydrate (each sits in its
own Suspense boundary, hydrated a slice at a time) and replaced their text
with token spans, so their hydration failed. Page order and runner load
decide who loses, which is why it moved between pages and did not show
locally.

getPrism now sets window.Prism.manual before the import. Each CodeBlock
already highlights its own element in an effect, so nothing loses
highlighting (checked on /modules/codeBlock: 39 of 62 code elements
highlighted with and without the automatic pass; the rest are plain diff
rows and empty lines).

codeblock-prism-manual.test.tsx renders a CodeBlock beside a foreign
<code class="language-js">; without the fix Prism tokenises it.

Also merges origin/preview (0482e2d), resolving CHANGELOG.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
Resolves Input, Textarea, TagInput and NumberInput against #210/#232:
keeps preview's type-only imports and NumberInput's clamped stepBy, with
this branch's FieldSize and the xxs stepper layout on top.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1

Copy link
Copy Markdown
Member Author

Visual check: 5 shots differ, labelled visual-change.

  • 3 on /form-controls/textarea: the new Sizes example adds 72.5px above them, so every later demo lands half a pixel lower. The components are unchanged; intended.
  • 2 tiles on /blocks/social: two masonry images didn't load in the head capture. This PR doesn't touch that page; it's image-load timing in the capture, not a change here.

Generated by Claude Code

@lorant-one
lorant-one merged commit 1255966 into preview Oct 18, 2026
13 of 14 checks passed
@github-actions github-actions Bot mentioned this pull request Oct 18, 2026
30 tasks done
lorant-one pushed a commit that referenced this pull request Oct 18, 2026
…3.0 branch

Brings in Input size "xxs" (32px, the height of a small Button) for every
text field and Form, and CodeBlock setting window.Prism.manual before Prism
loads, which stops Prism's automatic pass rewriting CodeBlocks before they
hydrate (the intermittent React #418 in check:render).

Resolved toward 3.0: the 3.0 side of each field component, with #229's
changes re-applied by hand (ESM .js imports, plain ref prop, FieldSize
through useFieldSize/useFieldSizing so the density "auto" path keeps
working). ColorInput's icon buttons leave their size out above xxs so the
theme density still sets it. NumberInput's minWidth stays a rem string.
The preview-side tests and docs got one codemod pass on copies, then hand
fixes: PasswordInput -> Input type="password", DateRangeInput ->
DateInput range, onChange/onSelect -> onValueChange, and the Button height
check reads the `s` mixin 3.0's `.s` includes. The DateRangeInput and
PasswordInput pages stay 3.0 stubs; their toolbar-size examples moved to
DateInput's page and Input's text. The field.size gotcha no longer lists the
two folded components.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01YJHdG7ZbpQS64MtL5PVbT1
@lorant-one lorant-one added approved and removed visual-change labels Oct 20, 2026 — with Claude
@lorant-one
lorant-one deleted the feat/input-small-size branch October 29, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants