Skip to content

Commit e18ac15

Browse files
committed
fix(web): drive auth modal dark via Clerk appearance variables
@clerk/ui ignores the legacy baseTheme preset for colors, so the card stayed white. Set the dark palette through appearance.variables (colorBackground etc.) plus element overrides so Clerk's native chrome renders fully dark, matching V1.
1 parent 66ea103 commit e18ac15

1 file changed

Lines changed: 24 additions & 6 deletions

File tree

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
11
import { dark } from "@clerk/themes";
22

3-
// Exact parity with cheatcode V1's auth modal: Clerk's native dark theme with the card's own
4-
// border/shadow removed (the modal shell provides the surface). Keeping Clerk's default chrome
5-
// — header, social buttons, divider, fields, footer — so it looks and feels 100% native.
3+
// Dark auth modal matching cheatcode V1. V2 runs Clerk's new @clerk/ui theming, which ignores
4+
// the legacy `baseTheme` preset for colors — the palette is driven by `variables` (the original
5+
// light modal set colorBackground:#fff here). We keep `baseTheme: dark` as the base and set the
6+
// dark palette + a few element overrides so Clerk's native chrome renders fully dark and native.
67
export const clerkAuthAppearance = {
78
baseTheme: dark,
89
elements: {
9-
card: "shadow-none border-0",
10-
developmentMode: "hidden",
11-
rootBox: "mx-auto",
10+
card: "!border-0 !bg-[#161616] !shadow-none",
11+
cardBox: "!bg-[#161616] !shadow-none",
12+
developmentMode: "!hidden",
13+
footer: "!border-[#262626] !border-t !bg-[#121212]",
14+
footerActionLink: "!text-[#f2f2f2] hover:!text-white",
15+
footerActionText: "!text-[#9a9a9a]",
16+
formButtonPrimary: "!bg-white !text-[#111111] hover:!bg-[#e6e6e6]",
17+
formFieldInput: "!border-[#2f2f2f] !bg-[#1f1f1f] !text-[#ededed] placeholder:!text-[#6f6f6f]",
18+
headerSubtitle: "!text-[#a1a1a1]",
19+
headerTitle: "!text-[#f2f2f2]",
20+
rootBox: "!mx-auto !w-full",
21+
socialButtonsBlockButton: "!border-[#2f2f2f] !bg-[#1f1f1f] !text-[#ededed] hover:!bg-[#262626]",
1222
},
1323
variables: {
24+
borderRadius: "10px",
25+
colorBackground: "#161616",
26+
colorInputBackground: "#1f1f1f",
27+
colorInputText: "#ededed",
28+
colorNeutral: "#ffffff",
29+
colorPrimary: "#ffffff",
30+
colorText: "#ededed",
31+
colorTextSecondary: "#a1a1a1",
1432
fontFamily: "var(--font-geist-sans), Arial, sans-serif",
1533
},
1634
};

0 commit comments

Comments
 (0)