Repository navigation
Commit ee42864
committed
feat(lab): SearchField, the iOS 26 search field that activates on UIKit's clock
Lab's SearchField is the phone search field of iOS 26's UISearchController,
in three placements:
- stacked: under a navigation bar's title, a tap activates it into the bar
over UIKit's 383 ms ease-in-ease-out: the field narrows, a glass close
button slides in beside it, and the large title rides up and fades; the
close button cancels on the same clock;
- bottom: iOS 26's toolbar field, resting above the keyboard by the
keyboard's height as spec:AST-099 FR2 measures it from the visual
viewport, in every browser (DEC-4), never overlaying the keyboard on the
page (DEC-2); its gel plays the activation and cancel frames measured on
iOS, and a change of mind mid-motion turns from where the field is,
without a snap;
- tab: the content a tab bar's search tab holds.
In the bottom and tab placements, under a finger or a pen on a touch
screen, wherever the keyboard covers the page (Mobile Safari, Chrome on
Android), the field claims a tap on its text, so it focuses without the
browser's reveal, which would pan the page (FR4), and the caret lands
where iOS puts it; Core's click guard keeps the claimed tap's late mouse
events from the page. The stacked field keeps the browser's own tap.
With a fine primary pointer (a mouse, a desktop pen tablet) the browser
keeps its own focus and click, and the parts take their places at once.
With reduced motion the travel becomes a cross-fade under a finger
(design:reduced-motion DR2). The values measured on the iOS 26.2 simulator
live in Lab (internal/searchMotion.ts), where the bars that host the field
can read them too. Its close and clear buttons' names are in the shared
message catalog, as Lab's other components' are. `astryx discover` lists
it.
Its unit tests cover the model, the motion and the field; its interaction
specs prove the stacked, bottom and tab placements in Chromium and WebKit,
including the change-of-mind turns on the motion's own clock and, with
Chrome on Android's keyboard report present, the claimed tap and the
visual-viewport measurement.1 parent c4a36b9 commit ee42864
21 files changed
Lines changed: 6779 additions & 0 deletions
File tree
- .changeset
- apps/storybook/stories
- internal/shadcn-registry
- packages
- cli/assets/discover
- core/locales
- lab/src
- SearchField
- __tests__
- internal
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
0 commit comments