

























Clerk components now support a dedicated shadcn/ui theme that automatically matches your application's existing shadcn/ui theme configuration. Built on the new CSS variables support, this theme ensures Clerk's authentication UI feels native to your shadcn/ui-based applications.
To install the shadcn theme, run the following command to install the @clerk/themes package:
npm install @clerk/themesyarn add @clerk/themespnpm add @clerk/themesbun add @clerk/themesThen pass the shadcn theme to the ClerkProvider component as the baseTheme property:
import { shadcn } from '@clerk/themes'
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<ClerkProvider
appearance={{
baseTheme: shadcn,
}}
>
<html lang="en">
<body>{children}</body>
</html>
</ClerkProvider>
)
}此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。