@streetjs/auth-ui
v0.1.2
Published
Accessible, themeable React auth components for StreetJS (login, register, forgot-password, MFA, profile) built on @streetjs/react.
Downloads
405
Maintainers
Readme
@streetjs/auth-ui
Accessible, themeable React auth components for
StreetJS, built on
@streetjs/react. CSS-variable
theming with built-in dark mode; no CSS-in-JS runtime. React is a peer dependency.
npm install @streetjs/client @streetjs/react @streetjs/auth-ui reactComponents
LoginForm, RegisterForm, ForgotPasswordForm, MFASetup, ProfileSettings,
plus StreetAuthStyles (default stylesheet) and primitives (Field, Button, ErrorText).
import { StreetProvider } from '@streetjs/react';
import { createStreetClient } from '@streetjs/client';
import { LoginForm, StreetAuthStyles } from '@streetjs/auth-ui';
const client = createStreetClient({ baseUrl: '/api', credentials: 'include' });
function SignIn() {
return (
<StreetProvider client={client}>
<StreetAuthStyles />
<LoginForm theme="dark" onSuccess={() => location.assign('/')} />
</StreetProvider>
);
}Components consume your existing StreetJS auth APIs (JWT/sessions/RBAC/MFA) — no
backend logic is duplicated. Theme via the theme prop (light/dark) or by
overriding the --st-* CSS variables.
Status:
0.1.xpreview — pre-1.0. Verified by build + type-check + export-shape tests (not full DOM render tests).
License
MIT
