components / login-form

login-form.

styled credential form with loading / error / rate-limited states and enter-to-submit. transport-agnostic via an injected onSubmit; behavior split into a headless useLoginForm hook. rate limiting and lockout belong on the consumer's backend.

log in

installation
bunx @justin06lee/chrome@latest add login-form
props
nametypedefaultdescription
onSubmit(credentials) => Promise<{ error?, rateLimited? } | void>-caller submit; resolve to succeed, return an error / rateLimited result or throw to fail.
fieldsLoginField[]-fields to render. defaults to a single password field.
titlestring'log in'heading above the fields.
submitLabelstring'log in'button label when idle.
loadingLabelstring'signing in...'button label while submitting.