Clerk-Themez is a collection of custom themes designed specifically for Clerk authentication components. With these themes, you can style Clerk’s sign-in, sign-up, and user button management sections globally by importing the theme once in your root or layout file.
- 25 custom themes to choose from
- Global application of themes across all Clerk auth sections
- Works with Next.js and other frameworks
npm install clerk-themez
npm install @clerk/nextjs
npm install @clerk/themes
import { SignIn } from '@clerk/nextjs';
import React from 'react';
const SignInPage = () => {
return (
<main className="flex items-center justify-center min-h-screen relative ">
<SignIn />
</main>
);
};
export default SignInPage;
import { SignUp } from "@clerk/nextjs";
import React from "react";
const SignUpPage = () => {
return (
<main className="flex items-center justify-center min-h-screen relative ">
<SignUp />
</main>
);
};
export default SignUpPage;
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=<add your key>
CLERK_SECRET_KEY=<add your key>
# That must add
NEXT_PUBLIC_CLERK_SIGN_IN_URL=/sign-in
NEXT_PUBLIC_CLERK_SIGN_UP_URL=/sign-up
import { neobrutalism } from "@clerk/themes";
Step 8: Must add neobrutalism
and variables: { colorPrimary: "#fa0053" },
this in your <ClerkProvider>
, in your root directory :
<ClerkProvider
appearance={{
baseTheme: neobrutalism,
variables: { colorPrimary: "#fa0053" },
}}
>
<html lang="en">
<body >{children}</body>
</html>
</ClerkProvider>
import 'clerk-themez/themes/<themename>.css';
Step 10: Create middleware.ts or middleware.js
in root directory ( Example :src/middleware.ts
(next.js)):
import { clerkMiddleware } from "@clerk/nextjs/server";
export default clerkMiddleware();
export const config = {
matcher: [
// Skip Next.js internals and all static files, unless found in search params
'/((?!_next|[^?]*\\.(?:html?|css|js(?!on)|jpe?g|webp|png|gif|svg|ttf|woff2?|ico|csv|docx?|xlsx?|zip|webmanifest)).*)',
// Always run for API routes
'/(api|trpc)(.*)',
],
};
Once installed, you can easily apply a theme globally by importing it into your root or layout file.
In a Next.js project, import the theme in your layout.tsx
file for it to apply across all Clerk components (such as SignIn
, SignUp
, and the UserButton
).
Example (Next.js):
// src/app/layout.tsx
import type { Metadata } from "next";
import { ClerkProvider } from "@clerk/nextjs";
import { neobrutalism } from "@clerk/themes";
import 'clerk-themez/themes/<themename>.css'; // Import the chosen theme
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode;
}>) {
return (
<ClerkProvider
appearance={{
baseTheme: neobrutalism,
variables: { colorPrimary: "#fa0053" },
}}
>
<html lang="en">
<body >{children}</body>
</html>
</ClerkProvider>
);
}
Replace <themename>
with the name of your preferred theme from the list below.
By importing the theme in the root file (layout.tsx
for Next.js), the styles will automatically apply to all Clerk authentication components across your app, including:
- Sign-in page
- Sign-up page
- User management sections (e.g.,
UserButton
)
In other frameworks (e.g., React, Vue, etc.), you can achieve the same effect by importing the theme in your root component or the entry point of your application.
For example, in a React project, import the theme in the App.js
or App.tsx
file:
// App.js
import 'clerk-themez/themes/<themename>.css';
function App() {
return (
<div className="App">
{/* Your components */}
</div>
);
}
export default App;
Here is a list of available themes:
Here is the list with all the themes arranged in the same format:
import 'clerk-themez/themes/cosmicflux.css';
import 'clerk-themez/themes/blackbluish.css';
import 'clerk-themez/themes/blueblush.css';
import 'clerk-themez/themes/bluresh.css';
import 'clerk-themez/themes/darklitflux.css';
import 'clerk-themez/themes/dreamscape.css';
import 'clerk-themez/themes/ember.css';
import 'clerk-themez/themes/floatball.css';
import 'clerk-themez/themes/glassyblack.css';
import 'clerk-themez/themes/glassybluesh.css';
import 'clerk-themez/themes/glassygreesh.css';
import 'clerk-themez/themes/leafgreen.css';
import 'clerk-themez/themes/moonlit.css';
import 'clerk-themez/themes/moonlitflux.css';
import 'clerk-themez/themes/neonwave.css';
import 'clerk-themez/themes/nightdream.css';
import 'clerk-themez/themes/pinkbless.css';
import 'clerk-themez/themes/pinkdrish.css';
import 'clerk-themez/themes/pinkesh.css';
import 'clerk-themez/themes/prismatic.css';
import 'clerk-themez/themes/sunsetblaze.css';
import 'clerk-themez/themes/waveflux.css';
import 'clerk-themez/themes/whisperflux.css';
import 'clerk-themez/themes/whitegrain.css';
import 'clerk-themez/themes/zestful.css';
If you want to tweak the themes to match your app's branding, you can modify the CSS Class directly or use the provided styles as a base.
.cl-backLink,.cl-button,.cl-button:focus,.cl-button:hover,.cl-dividerLine,.cl-dividerText,.cl-footer,.cl-footerActionText,.cl-formFieldInput,.cl-formFieldInputShowPasswordButton,.cl-formFieldInputShowPasswordButton:hover,.cl-formFieldLabel,.cl-formFieldRadioLabelTitle,.cl-formResendCodeLink,.cl-headerSubtitle,.cl-headerTitle,.cl-identityPreviewEditButton,.cl-identityPreviewText,.cl-internal-10vqj2v,.cl-internal-1338bh3,.cl-internal-13lvar6,.cl-internal-13u79ez,.cl-internal-162hn3d,.cl-internal-178xxbv,.cl-internal-17jfncx,.cl-internal-18msqv3,.cl-internal-1b2ebjn,.cl-internal-1dauvpw,.cl-internal-1e86so8,.cl-internal-1e86so8:focus,.cl-internal-1e86so8:hover,.cl-internal-1fsy72e,.cl-internal-1fy2g6e,.cl-internal-1fy2g6e:hover,.cl-internal-1hp5nqm,.cl-internal-1jcsuiw,.cl-internal-1jokxdd,.cl-internal-1k60c9o,.cl-internal-1mwxfst,.cl-internal-1y71s3o,.cl-internal-3f8jnx,.cl-internal-617r0v,.cl-internal-6ni1dv,.cl-internal-6ni1dv:hover,.cl-internal-bzdfjc,.cl-internal-csc3r5,.cl-internal-d2hd6e:hover,.cl-internal-d5dzke,.cl-internal-df7v37,.cl-internal-hy4pby,.cl-internal-k7p5wl,.cl-internal-mg5k16 .bg-white,.cl-internal-n0yayv,.cl-internal-s825v9 .cl-internal-1agciv4,.cl-internal-s825v9:hover,.cl-internal-xpydm8,.cl-internal-zqxz1f,.cl-menuItem:hover,.cl-navbarMobileMenuRow,.cl-otpCodeFieldInput,.cl-profileSectionTitleText,.cl-signIn-root,.cl-signIn-start,.cl-signUp-root,.cl-signUp-start,.cl-socialButtonsBlockButton,.cl-socialButtonsBlockButton:hover,.cl-socialButtonsBlockButtonText,.cl-userButtonPopoverActionButton,.cl-userButtonPopoverActionButton:hover,.cl-userButtonTrigger,.cl-userPreview,.cl-userPreviewSecondaryIdentifier
If you'd like to contribute to this collection of themes, feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.