-
Notifications
You must be signed in to change notification settings - Fork 371
feat(clerk-js,themes,types): Introduce Clerk CSS variables #6275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(clerk-js,themes,types): Introduce Clerk CSS variables #6275
Conversation
🦋 Changeset detectedLatest commit: 4b1bada The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
!snapshot |
…le-utilities-for-current-variables
Hey @alexcarpenter - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.1.7-snapshot.v20250711170548 --save-exact
npm i @clerk/astro@2.10.4-snapshot.v20250711170548 --save-exact
npm i @clerk/backend@2.4.2-snapshot.v20250711170548 --save-exact
npm i @clerk/chrome-extension@2.5.5-snapshot.v20250711170548 --save-exact
npm i @clerk/clerk-js@5.71.1-snapshot.v20250711170548 --save-exact
npm i @clerk/elements@0.23.39-snapshot.v20250711170548 --save-exact
npm i @clerk/clerk-expo@2.14.4-snapshot.v20250711170548 --save-exact
npm i @clerk/expo-passkeys@0.3.16-snapshot.v20250711170548 --save-exact
npm i @clerk/express@1.7.6-snapshot.v20250711170548 --save-exact
npm i @clerk/fastify@2.4.6-snapshot.v20250711170548 --save-exact
npm i @clerk/localizations@3.18.1-snapshot.v20250711170548 --save-exact
npm i @clerk/nextjs@6.24.1-snapshot.v20250711170548 --save-exact
npm i @clerk/nuxt@1.7.7-snapshot.v20250711170548 --save-exact
npm i @clerk/clerk-react@5.33.1-snapshot.v20250711170548 --save-exact
npm i @clerk/react-router@1.7.1-snapshot.v20250711170548 --save-exact
npm i @clerk/remix@4.9.1-snapshot.v20250711170548 --save-exact
npm i @clerk/shared@3.11.1-snapshot.v20250711170548 --save-exact
npm i @clerk/tanstack-react-start@0.19.1-snapshot.v20250711170548 --save-exact
npm i @clerk/testing@1.10.0-snapshot.v20250711170548 --save-exact
npm i @clerk/themes@2.2.56-snapshot.v20250711170548 --save-exact
npm i @clerk/types@4.64.1-snapshot.v20250711170548 --save-exact
npm i @clerk/vue@1.8.14-snapshot.v20250711170548 --save-exact |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
xl: '2', // 2.0 | ||
} as const); | ||
|
||
const radiiDefaultVar = clerkCssVar('border-radius', '0.375rem'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think I've ever seen radii
in code... 😄
…le-utilities-for-current-variables
…s-for-current-variables' of github.com:clerk/javascript into alexcarpenter/user-2202-add-clerk-css-variable-utilities-for-current-variables
!snapshot |
Hey @alexcarpenter - the snapshot version command generated the following package versions:
Tip: Use the snippet copy button below to quickly install the required packages. npm i @clerk/agent-toolkit@0.1.8-snapshot.v20250715171210 --save-exact
npm i @clerk/astro@2.10.5-snapshot.v20250715171210 --save-exact
npm i @clerk/backend@2.4.3-snapshot.v20250715171210 --save-exact
npm i @clerk/chrome-extension@2.5.6-snapshot.v20250715171210 --save-exact
npm i @clerk/clerk-js@5.73.0-snapshot.v20250715171210 --save-exact
npm i @clerk/elements@0.23.40-snapshot.v20250715171210 --save-exact
npm i @clerk/clerk-expo@2.14.5-snapshot.v20250715171210 --save-exact
npm i @clerk/expo-passkeys@0.3.17-snapshot.v20250715171210 --save-exact
npm i @clerk/express@1.7.7-snapshot.v20250715171210 --save-exact
npm i @clerk/fastify@2.4.7-snapshot.v20250715171210 --save-exact
npm i @clerk/localizations@3.19.0-snapshot.v20250715171210 --save-exact
npm i @clerk/nextjs@6.25.1-snapshot.v20250715171210 --save-exact
npm i @clerk/nuxt@1.7.8-snapshot.v20250715171210 --save-exact
npm i @clerk/clerk-react@5.35.0-snapshot.v20250715171210 --save-exact
npm i @clerk/react-router@1.8.1-snapshot.v20250715171210 --save-exact
npm i @clerk/remix@4.10.1-snapshot.v20250715171210 --save-exact
npm i @clerk/shared@3.12.1-snapshot.v20250715171210 --save-exact
npm i @clerk/tanstack-react-start@0.20.1-snapshot.v20250715171210 --save-exact
npm i @clerk/testing@1.10.1-snapshot.v20250715171210 --save-exact
npm i @clerk/themes@2.3.0-snapshot.v20250715171210 --save-exact
npm i @clerk/types@4.66.0-snapshot.v20250715171210 --save-exact
npm i @clerk/vue@1.8.15-snapshot.v20250715171210 --save-exact |
…le-utilities-for-current-variables
Description
This PR exposes the ability to theme Clerk components using CSS custom properties, avoiding the need to pass variables into the appearance variables prop.
All of the variables support an accompanying clerk prefixed CSS custom property. The CSS custom property is using kebab casing.
e.g.
colorPrimary
=--clerk-color-primary
.The equivalent using the appearance prop would be:
Deprecated variables
This PR also makes some updates to current variable names, with deprecation notices to migrate to the updated keys.
colorText
colorForeground
colorTextOnPrimaryBackground
colorPrimaryForeground
colorTextSecondary
colorMutedForeground
spacingUnit
spacing
colorInputText
colorInputForeground
colorInputBackground
colorInput
New variables
colorRing
- The color of the ring when an interactive element is focused.colorMuted
- The background color for elements of lower importance, eg: a muted background.colorShadow
- The base shadow color used in the components.colorBorder
- The base border color used in the components.colorModalBackdrop
- The background color of the modal backdrop.Resolves USER-2202
Checklist
pnpm test
runs as expected.pnpm build
runs as expected.Type of change
Summary by CodeRabbit
Summary by CodeRabbit
New Features
Refactor
Style
Documentation
Tests