clerk-elements
Build bespoke authentication interfaces using Clerk Elements, a library of composable UI components designed for Clerk's APIs and custom styling.
Build Tailored Authentication Interfaces with Clerk Elements
Clerk Elements provides developers with a granular toolkit of composable components to construct fully customized user authentication experiences. These elements integrate directly with Clerk's backend APIs, offering the flexibility to design sign-in, sign-up, and multi-factor authentication flows that precisely match your application's branding and user journey. This approach is ideal for creating unique UIs, as demonstrated by its compatibility with libraries like shadcn/ui for styling and layout.
Features:
- Composable Sign-Up Elements: Includes
SignUp.Root,SignUp.Step,SignUp.Action, andSignUp.Captchafor building custom, multi-stage user registration forms. - Composable Sign-In Elements: Provides
SignIn.Root,SignIn.Step,SignIn.Action, andSignIn.SafeIdentifierto create tailored user login interfaces. - Core Form Primitives: Offers
Clerk.Field,Clerk.Label,Clerk.Input, andClerk.FieldErrorfor building structured and accessible form inputs. - Social Authentication Integration: The
Clerk.Connectioncomponent enables easy addition of social login options like GitHub and Google. - Dedicated OTP Input: Features a specialized
Clerk.Input type="otp"component with custom rendering capabilities for one-time password fields. - Multi-Step Flow Management: Supports defining and navigating through distinct stages in authentication processes using
SignUp.StepandSignIn.Step. - Asynchronous State Handling: The
Clerk.Loadingcomponent allows managing and displaying loading indicators for form submissions or provider interactions. - Authentication Strategy Components: Elements like
SignIn.SupportedStrategyenable users to select from available authentication methods (e.g., password, email code). - Navigational Links:
Clerk.Linkcomponent facilitates navigation between different parts of the authentication flow, like switching to sign-up. - Action-Specific Components:
SignUp.ActionandSignIn.Actionprovide dedicated elements for form submission, step navigation, or resending codes. - Styling Agnosticism: Designed to be styled with any CSS solution or UI library, with examples showcasing integration with shadcn/ui.
- Error Display for Fields:
Clerk.FieldErrorcomponent for showing validation errors specific to each input field.
Summary:
Clerk Elements empowers developers to move beyond pre-built widgets by offering a suite of composable UI components for crafting bespoke authentication experiences. This library allows for the construction of unique sign-in, sign-up, and OTP verification flows that integrate with Clerk's APIs. Its flexibility is highlighted by its ability to work with UI frameworks like shadcn/ui, enabling developers to build highly customized and branded authentication journeys directly within their applications.