Skip to Content
Clerk logo

Clerk Docs

Ctrl + K
Go to clerkstage.dev

Variables

The variables property is used to adjust the general styles of the component's base theme, like colors, backgrounds, typography.

Usage

app.tsx
import { ClerkProvider } from '@clerk/nextjs'; <ClerkProvider appearance={{ variables: { colorPrimary: "red", colorText: "white" } }}> {/* ... */} </ClerkProvider>

Properties

NameTypeDescription
colorPrimarystringThe primary color used throughout the components.
colorDangerstringThe color used for error states.
colorSuccessstringThe color used for success states.
colorWarningstringThe color used for warning states.
colorAlphaShadestringThe color that will be used for all to generate the alpha shades the components use. This option applies to borders, backgrounds for hovered elements, hovered dropdown options.
colorTextOnPrimaryBackgroundstringThe color used for text on the primary background.
colorTextSecondarystringThe color used for secondary text.
colorBackgroundstringThe background color for the card container.
colorInputTextstringThe color used for text in input fields.
colorInputBackgroundstringThe background color used for input fields.
fontFamilystringThe font family used throughout the components. By default, it is set to inherit.
fontFamilyButtonsstringThe font family used for buttons. By default, it is set to inherit.
fontSizestringThe font size used throughout the components. By default, this is set to 1rem.
fontSmoothing'auto' | 'antialiased' | 'never'The font smoothing used throughout the components. By default, this is set to auto.
fontWeight{normal: number, medium: number, bold: number}The font weight used throughout the components. By default, this is set to {normal: 400, medium: 500, bold: 600}.
borderRadiusstringThe border radius used throughout the components. By default, this is set to 0.375rem.
spacingUnitstringThe spacing unit used throughout the components. By default, this is set to 1rem.

What did you think of this content?

Clerk © 2023