A comprehensive library of reusable UI components and utilities for Auth0 integrations, built with modern web technologies and designed for scalability.
For detailed information on how to use these components and get started with Auth0, please refer to the following resources:
- Auth0 Quickstarts: Official guides for creating and configuring your application on the Auth0 platform.
- Auth0 APIs: Comprehensive documentation for Auth0's APIs.
- Component Documentation: Live Storybook showcasing all available components, their props, and usage examples.
- Examples Folder: Practical, hands-on sample applications demonstrating how to integrate and use these components in a real project.
This project uses a monorepo architecture designed for multi-framework support. It is organized into two main types of packages:
- A framework-agnostic
@auth0/web-ui-components-corepackage that contains all the core logic, services, and utilities. - Framework-specific packages (like
@auth0/web-ui-components-react) that provide UI components and hooks for a particular technology. This structure allows for the future addition of packages for other frameworks like Vue or Angular.
@auth0/web-ui-components-core - The foundational package containing core utilities and services.
What it provides:
- 📦 Internal Services: Handles all API logic for "My Account" and "My Org" components, using the "My Account" and "My Org" SDKs.
- 🌐 Internationalization (i18n): Contains all translation files for multi-language support and utils.
- 🛡️ Schema Validation: Defines and maintains types for schema validation.
- 🛠️ Shared Utilities: Provides shared functions, TypeScript types, and theme management utilities.
@auth0/web-ui-components-react - React-specific UI components and hooks for Auth0 integrations.
What it provides:
- ⚛️ React Components: Pre-built UI components for Auth0 features (MFA management, user profiles, ,org management etc.)
- 🎣 Custom Hooks: React hooks for component state management and API interactions
- 🎨 UI Elements: Beautiful, accessible components built with Radix UI and Tailwind CSS, following shadcn design patterns.
- 🔄 Providers: React context providers for managing authentication, theme, and internationalization.
For detailed instructions on how to install and use the components in your project, please refer to the README.md file within the specific framework package you are using.
- Node.js >= 18
- PNPM (recommended package manager)
-
Clone the repository:
git clone https://github.com/auth0/auth0-ui-components cd auth0-ui-components -
Install dependencies:
pnpm install
-
Build all packages:
pnpm run build
To make and test changes locally:
- Make your desired changes in any of the packages (e.g.,
packages/coreorpackages/react). - Re-build all packages to apply your changes:
pnpm run build
- Navigate to a technology-specific example application in the
examples/directory (e.g.,examples/react-spa-npm). - Configure the required environment variables in a
.envfile as per the example'sREADME. - Start the development server to see your changes in action:
pnpm run dev
Running tests:
pnpm run test
pnpm run test:react
pnpm run test:coreTo run a specific test, go to the relevant package folder and run:
pnpm run test org-details-edit-
Update
registry.jsonwith your changes. -
Create a new build based on
registry.json:pnpm build:shadcn
-
Open
docs-siteand serve the registry:
cd docs-site
pnpm install
pnpm run dev-
Go to your app (e.g.,
react-spa-shadcn) and update the components:npx shadcn@latest add http://localhost:5173/r/my-account/user-mfa-management.json --overwrite npx shadcn@latest add http://localhost:5173/r/my-org/org-details-edit.json --overwrite # ... other componentsNote: The port may differ if other applications are running.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bugs, feature requests, or improvements.
Copyright 2025 Okta, Inc
This project is licensed under the MIT License. See the LICENSE file for details.
Authors
Okta Inc.