PasskeyButton

Continue with passkey. While the device prompt is open, rings ripple out of the badge; a recognised passkey becomes a drawn tick, a refusal a cross. The label follows each state. Auth.

Open playground

About

PasskeyButton is a React component in the Auth category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { PasskeyButton } from "@ashutoshswamy/smoui" and set onAuthenticate, children.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { PasskeyButton } from "@ashutoshswamy/smoui";

<PasskeyButton onAuthenticate={() => signInWithPasskey()} />

Props 2

onAuthenticate

Run the device prompt. Resolve to succeed, reject if cancelled or not recognised.

() => void | Promise<unknown>
children

Idle label.

stringdefault "Continue with passkey"