@glinr/theauth-ui provides drop-in React components for auth flows. Each component renders inside TheAuthProvider from @glinr/theauth-react and wires up to your theAuth API route automatically, no manual fetch calls required.
Components require
@glinr/theauth-react to be installed and a TheAuthProvider wrapping your app. See the React hooks page for provider setup.Installation
@glinr/theauth-ui to your tailwind.config.ts content paths:
Copy the source into your project
If you want to own and edit the components rather than depend on the package, copy them in, the way shadcn/ui works. This is optional: the packaged components keep working and you can mix both.src/components/theauth (or components/theauth when there is no src folder), prints the one dependency to install, and never overwrites a file you changed unless you pass --overwrite. Each component pulls in theauth-base (types, class helper, default slots and the auth card) once.
TheAuthProvider as above:
@glinr/theauth-react for the hooks and nothing else beyond React. Re-run theauth add <name> --overwrite after upgrading if you want the newer upstream version, and review the diff first.
Available components
SignIn
Renders an email/password form. PassshowMagicLink to add a passwordless tab. Pass providers to show OAuth buttons above the form.
SignUp
UserButton
Renders an avatar that opens a dropdown menu. Includes sign-out by default. PassmenuItems to add custom actions.
OAuthButtons
Use standalone when you want social login without the full sign-in card.OAUTH_PROVIDERS ships with metadata and icons for Google, GitHub, GitLab, Discord, Twitter, Facebook, Microsoft, Apple, LinkedIn, Slack, Notion, Reddit, Spotify, and Twitch. You can also pass a custom provider object matching OAuthProviderMeta.
Customization
Class name overrides
Every component accepts aclassNames prop with keys for each sub-element. Pass a string to append classes, or a function that receives the default class string.
Slot replacement
Pass acomponents prop to replace any primitive (input, button, link, divider, error). Useful when you need to use your own design system components.
cx utility is exported from @glinr/theauth-ui for merging class names in your own slot components.
Framework examples
Next.js App Router
Vite + React Router
Next steps
React hooks
useSession, useUser, useSignIn, and more.
Adapters
Mount the theAuth handler in Next.js, Express, Hono, and others.
Auth
Configure email/password, magic links, OAuth, and 2FA.