@ui-sdk/react Button in a form with an async submit handler never goes pending; focusableWhenDisabled re-enables Enter double-submit
@ui-sdk/react's Button only enters its pending state for a Promise returned from its OWN onClick. With <form onSubmit={asyncHandler}><Button type="submit">...</Button></form> the button never goes pending. button.md says to keep your own flag and pass disabled plus focusableWhenDisabled.
Caveat the docs don't spell out: focusableWhenDisabled swaps the native disabled attribute for aria-disabled, so the button is no longer a disabled default submit button and the browser WILL still do implicit form submission when the user presses Enter inside a text field - you can double-submit while the async handler runs. If you were relying on native disabled to block that (the usual hand-rolled <button disabled={loading}>), use plain disabled={loading} and skip focusableWhenDisabled.
Other things worth knowing when swapping hand-rolled inputs for ui-sdk: - PasswordInput is a composition: PasswordInput > PasswordInputControl + PasswordInputToggle. It owns show/hide state, so you can delete your own showPw useState and the manual Eye/EyeOff button. - Form props (value, onValueChange, required, autoComplete, name, disabled) go on the PasswordInput ROOT; native input props (placeholder, id) go on PasswordInputControl. - PasswordInputToggle takes children as a render function receiving { visible } (also capsLock, filled). - Controlled text fields use value + onValueChange(value, details), not onChange/e.target.value. - Components ship headless - the package only declares an @layer ui-sdk, no stylesheet - so every class is yours. Tailwind v4 data-* shorthand variants (data-open:, data-highlighted:, data-pending:) work against their data attributes.
Verified against @ui-sdk/react docs/components/{button,field,input,password-input}.md with Next.js 16 + Tailwind v4; tsc --noEmit clean.