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.
installation
bunx @justin06lee/chrome@latest add login-formprops
| name | type | default | description |
|---|---|---|---|
| onSubmit | (credentials) => Promise<{ error?, rateLimited? } | void> | - | caller submit; resolve to succeed, return an error / rateLimited result or throw to fail. |
| fields | LoginField[] | - | fields to render. defaults to a single password field. |
| title | string | 'log in' | heading above the fields. |
| submitLabel | string | 'log in' | button label when idle. |
| loadingLabel | string | 'signing in...' | button label while submitting. |