Uh oh!
There was an error while loading. Please reload this page.
feat(clerk-js,types): Introduce captcha appearance property for the CAPTCHA widget - #5184
Conversation
🦋 Changeset detectedLatest commit: 4a482c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 23 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 ↗︎
|
anagstef
commented
Feb 17, 2025
!snapshot |
clerk-cookie
commented
Feb 17, 2025
Hey @anagstef - 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.0.3-snapshot.v20250217155330 --save-exact
npm i @clerk/astro@2.2.1-snapshot.v20250217155330 --save-exact
npm i @clerk/backend@1.24.2-snapshot.v20250217155330 --save-exact
npm i @clerk/chrome-extension@2.2.10-snapshot.v20250217155330 --save-exact
npm i @clerk/clerk-js@5.53.0-snapshot.v20250217155330 --save-exact
npm i @clerk/elements@0.22.23-snapshot.v20250217155330 --save-exact
npm i @clerk/clerk-expo@2.7.8-snapshot.v20250217155330 --save-exact
npm i @clerk/expo-passkeys@0.1.21-snapshot.v20250217155330 --save-exact
npm i @clerk/express@1.3.49-snapshot.v20250217155330 --save-exact
npm i @clerk/fastify@2.1.22-snapshot.v20250217155330 --save-exact
npm i @clerk/localizations@3.10.7-snapshot.v20250217155330 --save-exact
npm i @clerk/nextjs@6.12.0-snapshot.v20250217155330 --save-exact
npm i @clerk/nuxt@1.2.0-snapshot.v20250217155330 --save-exact
npm i @clerk/clerk-react@5.23.0-snapshot.v20250217155330 --save-exact
npm i @clerk/react-router@1.1.0-snapshot.v20250217155330 --save-exact
npm i @clerk/remix@4.5.0-snapshot.v20250217155330 --save-exact
npm i @clerk/shared@2.22.0-snapshot.v20250217155330 --save-exact
npm i @clerk/tanstack-start@0.10.0-snapshot.v20250217155330 --save-exact
npm i @clerk/testing@1.4.23-snapshot.v20250217155330 --save-exact
npm i @clerk/themes@2.2.19-snapshot.v20250217155330 --save-exact
npm i @clerk/types@4.47.0-snapshot.v20250217155330 --save-exact
npm i @clerk/ui@0.3.24-snapshot.v20250217155330 --save-exact
npm i @clerk/vue@1.2.1-snapshot.v20250217155330 --save-exact |
…urnstile-appearance
anagstef
commented
Feb 18, 2025
!snapshot |
clerk-cookie
commented
Feb 18, 2025
Hey @anagstef - 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.0.3-snapshot.v20250218151529 --save-exact
npm i @clerk/astro@2.2.1-snapshot.v20250218151529 --save-exact
npm i @clerk/backend@1.24.2-snapshot.v20250218151529 --save-exact
npm i @clerk/chrome-extension@2.2.10-snapshot.v20250218151529 --save-exact
npm i @clerk/clerk-js@5.53.0-snapshot.v20250218151529 --save-exact
npm i @clerk/elements@0.22.23-snapshot.v20250218151529 --save-exact
npm i @clerk/clerk-expo@2.7.8-snapshot.v20250218151529 --save-exact
npm i @clerk/expo-passkeys@0.1.21-snapshot.v20250218151529 --save-exact
npm i @clerk/express@1.3.49-snapshot.v20250218151529 --save-exact
npm i @clerk/fastify@2.1.22-snapshot.v20250218151529 --save-exact
npm i @clerk/localizations@3.10.7-snapshot.v20250218151529 --save-exact
npm i @clerk/nextjs@6.12.0-snapshot.v20250218151529 --save-exact
npm i @clerk/nuxt@1.2.0-snapshot.v20250218151529 --save-exact
npm i @clerk/clerk-react@5.23.0-snapshot.v20250218151529 --save-exact
npm i @clerk/react-router@1.1.0-snapshot.v20250218151529 --save-exact
npm i @clerk/remix@4.5.0-snapshot.v20250218151529 --save-exact
npm i @clerk/shared@2.22.0-snapshot.v20250218151529 --save-exact
npm i @clerk/tanstack-start@0.10.0-snapshot.v20250218151529 --save-exact
npm i @clerk/testing@1.4.23-snapshot.v20250218151529 --save-exact
npm i @clerk/themes@2.3.0-snapshot.v20250218151529 --save-exact
npm i @clerk/types@4.47.0-snapshot.v20250218151529 --save-exact
npm i @clerk/ui@0.3.24-snapshot.v20250218151529 --save-exact
npm i @clerk/vue@1.2.1-snapshot.v20250218151529 --save-exact |
anagstef
commented
Feb 19, 2025
!snapshot |
clerk-cookie
commented
Feb 19, 2025
Hey @anagstef - 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.0.4-snapshot.v20250219092422 --save-exact
npm i @clerk/astro@2.3.0-snapshot.v20250219092422 --save-exact
npm i @clerk/backend@1.24.3-snapshot.v20250219092422 --save-exact
npm i @clerk/chrome-extension@2.2.11-snapshot.v20250219092422 --save-exact
npm i @clerk/clerk-js@5.54.0-snapshot.v20250219092422 --save-exact
npm i @clerk/elements@0.23.0-snapshot.v20250219092422 --save-exact
npm i @clerk/clerk-expo@2.8.0-snapshot.v20250219092422 --save-exact
npm i @clerk/expo-passkeys@0.1.22-snapshot.v20250219092422 --save-exact
npm i @clerk/express@1.3.50-snapshot.v20250219092422 --save-exact
npm i @clerk/fastify@2.1.23-snapshot.v20250219092422 --save-exact
npm i @clerk/localizations@3.10.8-snapshot.v20250219092422 --save-exact
npm i @clerk/nextjs@6.12.1-snapshot.v20250219092422 --save-exact
npm i @clerk/nuxt@1.2.1-snapshot.v20250219092422 --save-exact
npm i @clerk/clerk-react@5.24.0-snapshot.v20250219092422 --save-exact
npm i @clerk/react-router@1.1.1-snapshot.v20250219092422 --save-exact
npm i @clerk/remix@4.5.1-snapshot.v20250219092422 --save-exact
npm i @clerk/shared@2.23.0-snapshot.v20250219092422 --save-exact
npm i @clerk/tanstack-start@0.10.1-snapshot.v20250219092422 --save-exact
npm i @clerk/testing@1.4.24-snapshot.v20250219092422 --save-exact
npm i @clerk/themes@2.3.0-snapshot.v20250219092422 --save-exact
npm i @clerk/types@4.47.0-snapshot.v20250219092422 --save-exact
npm i @clerk/ui@0.3.25-snapshot.v20250219092422 --save-exact
npm i @clerk/vue@1.3.0-snapshot.v20250219092422 --save-exact |
…urnstile-appearance
anagstef
commented
Feb 21, 2025
!snapshot |
clerk-cookie
commented
Feb 21, 2025
Hey @anagstef - 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.0.4-snapshot.v20250221115552 --save-exact
npm i @clerk/astro@2.3.0-snapshot.v20250221115552 --save-exact
npm i @clerk/backend@1.24.3-snapshot.v20250221115552 --save-exact
npm i @clerk/chrome-extension@2.2.11-snapshot.v20250221115552 --save-exact
npm i @clerk/clerk-js@5.54.0-snapshot.v20250221115552 --save-exact
npm i @clerk/elements@0.23.0-snapshot.v20250221115552 --save-exact
npm i @clerk/clerk-expo@2.8.0-snapshot.v20250221115552 --save-exact
npm i @clerk/expo-passkeys@0.1.22-snapshot.v20250221115552 --save-exact
npm i @clerk/express@1.3.50-snapshot.v20250221115552 --save-exact
npm i @clerk/fastify@2.1.23-snapshot.v20250221115552 --save-exact
npm i @clerk/localizations@3.10.8-snapshot.v20250221115552 --save-exact
npm i @clerk/nextjs@6.12.1-snapshot.v20250221115552 --save-exact
npm i @clerk/nuxt@1.2.1-snapshot.v20250221115552 --save-exact
npm i @clerk/clerk-react@5.24.0-snapshot.v20250221115552 --save-exact
npm i @clerk/react-router@1.1.1-snapshot.v20250221115552 --save-exact
npm i @clerk/remix@4.5.1-snapshot.v20250221115552 --save-exact
npm i @clerk/shared@2.23.0-snapshot.v20250221115552 --save-exact
npm i @clerk/tanstack-start@0.10.1-snapshot.v20250221115552 --save-exact
npm i @clerk/testing@1.4.24-snapshot.v20250221115552 --save-exact
npm i @clerk/themes@2.3.0-snapshot.v20250221115552 --save-exact
npm i @clerk/types@4.47.0-snapshot.v20250221115552 --save-exact
npm i @clerk/ui@0.3.25-snapshot.v20250221115552 --save-exact
npm i @clerk/vue@1.3.0-snapshot.v20250221115552 --save-exact |
Uh oh!
There was an error while loading. Please reload this page.
alexcarpenter
left a comment
There was a problem hiding this comment.
LGTM, only suggestion is to type the getCaptchaAttibutesFromElemenet function to remove the need to cast the return values multiple times in turnstile.ts but not a blocker.
…urnstile-appearance
captcha appearance property for the CAPTCHA widget…urnstile-appearance
anagstef
commented
Feb 26, 2025
!snapshot |
clerk-cookie
commented
Feb 26, 2025
Hey @anagstef - 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.0.4-snapshot.v20250226102703 --save-exact
npm i @clerk/astro@2.3.0-snapshot.v20250226102703 --save-exact
npm i @clerk/backend@1.24.3-snapshot.v20250226102703 --save-exact
npm i @clerk/chrome-extension@2.2.11-snapshot.v20250226102703 --save-exact
npm i @clerk/clerk-js@5.54.0-snapshot.v20250226102703 --save-exact
npm i @clerk/elements@0.23.0-snapshot.v20250226102703 --save-exact
npm i @clerk/clerk-expo@2.8.0-snapshot.v20250226102703 --save-exact
npm i @clerk/expo-passkeys@0.1.22-snapshot.v20250226102703 --save-exact
npm i @clerk/express@1.3.50-snapshot.v20250226102703 --save-exact
npm i @clerk/fastify@2.1.23-snapshot.v20250226102703 --save-exact
npm i @clerk/localizations@3.10.8-snapshot.v20250226102703 --save-exact
npm i @clerk/nextjs@6.12.1-snapshot.v20250226102703 --save-exact
npm i @clerk/nuxt@1.2.1-snapshot.v20250226102703 --save-exact
npm i @clerk/clerk-react@5.24.0-snapshot.v20250226102703 --save-exact
npm i @clerk/react-router@1.1.1-snapshot.v20250226102703 --save-exact
npm i @clerk/remix@4.5.1-snapshot.v20250226102703 --save-exact
npm i @clerk/shared@3.0.0-snapshot.v20250226102703 --save-exact
npm i @clerk/tanstack-start@0.11.0-snapshot.v20250226102703 --save-exact
npm i @clerk/testing@1.4.24-snapshot.v20250226102703 --save-exact
npm i @clerk/themes@2.2.20-snapshot.v20250226102703 --save-exact
npm i @clerk/types@4.47.0-snapshot.v20250226102703 --save-exact
npm i @clerk/ui@0.3.25-snapshot.v20250226102703 --save-exact
npm i @clerk/vue@1.3.0-snapshot.v20250226102703 --save-exact |
Uh oh!
There was an error while loading. Please reload this page.
Description
This PR introduces customization options for the Turnstile captcha widget.
Appearance property
This PR adds the new
appearance.captchaproperty to enable Captcha widget customization:captcha.theme: The widget theme. Can take the following values:light,dark,auto. The default isauto.captcha.size: The widget size. Can take the following values:normal,flexible,compact. The default isnormal.captcha.language: Language to display, must be either:auto(default) to use the language that the visitor has chosen, or a string with the language and country code (e.g.en-US). When using Clerk UI Components it uses thelocalevalue of the localization used. If the language code is not supported it will fallback toen-US. Cloudflare list of supported languages: https://developers.cloudflare.com/turnstile/reference/supported-languagesExample:
When using the following:
The result is:

Custom flows
On custom flows the
appearance.captchaproperties are not used automatically, so in order to customize the captcha widget, we need to pass the following data attributes to theclerk-captchaelement:data-cl-themedata-cl-sizedata-cl-languageExample:
When using the following:
The result is:

Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change