demo · v133

Conditional UI feature gate

Use getClientCapabilities() to decide between three sign-in UIs: conditional-mediation (passkeys inline in the autofill drop-down), a passkey-only modal flow, or password-fallback. The branch chosen for this browser is highlighted live.

probing capabilities…

branch A — conditional UI

if conditional mediation supported, attach the listener so passkeys appear inline in the username field's autofill chip.

branch B — modal passkey

otherwise, show a button that triggers a modal navigator.credentials.get() on click.

branch C — password fallback

if no passkey support at all, render a password field.

see also