captcha
prop
The captcha
property can be used to change the appearance of the CAPTCHA widget. It is passed as a parameter to the appearance
prop.
Properties
- Name
theme
- Type
'auto' | 'light' | 'dark'
- Description
The CAPTCHA widget theme. Defaults to
auto
.
- Name
size
- Type
'normal' | 'flexible' | 'compact'
- Description
The CAPTCHA widget size. Defaults to
normal
.
- Name
language
- Type
string
- Description
The CAPTCHA widget language/locale. When setting the language for CAPTCHA, this is how localization is prioritized:
appearance.captcha.language
: Set by thislanguage
property.localization.locale
: Set by thelocalization
prop on<ClerkProvider>
. Some languages are supported by Clerk but not by Cloudflare Turnstile, which is used for the CAPTCHA widget. See Cloudflare Turnstile's supported languages.en-US
: Clerk's default language.
import { ClerkProvider } from '@clerk/nextjs';
<ClerkProvider
appearance={{
captcha: {
theme: 'dark',
size: 'flexible',
language: 'es-ES',
}
}}
>
{/* ... */}
</ClerkProvider>;
import clerk from '@clerk/astro'
export default defineConfig({
integrations: [
clerk({
appearance: {
captcha: {
theme: 'dark',
size: 'flexible',
language: 'es-ES',
},
},
}),
],
})
import React from 'react'
import './App.css'
import { ClerkProvider } from '@clerk/clerk-react'
if (!process.env.REACT_APP_CLERK_PUBLISHABLE_KEY) {
throw new Error('Missing Publishable Key')
}
const clerkPubKey = process.env.REACT_APP_CLERK_PUBLISHABLE_KEY
function App() {
return (
<ClerkProvider
appearance={{
captcha: {
theme: 'dark',
size: 'flexible',
language: 'es-ES',
},
}}
publishableKey={clerkPubKey}
>
{/* ... */}
</ClerkProvider>
)
}
export default App
// Import ClerkApp
import { ClerkApp } from '@clerk/remix'
import type { MetaFunction, LoaderFunction } from '@remix-run/node'
import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from '@remix-run/react'
import { rootAuthLoader } from '@clerk/remix/ssr.server'
export const meta: MetaFunction = () => ({
charset: 'utf-8',
title: 'New Remix App',
viewport: 'width=device-width,initial-scale=1',
})
export const loader: LoaderFunction = (args) => rootAuthLoader(args)
function App() {
return (
<html lang="en">
<head>
<Meta />
<Links />
</head>
<body>
<Outlet />
<ScrollRestoration />
<Scripts />
<LiveReload />
</body>
</html>
)
}
export default ClerkApp(App, {
appearance: {
captcha: {
theme: 'dark',
size: 'flexible',
language: 'es-ES',
},
},
})
export default defineNuxtConfig({
modules: ['@clerk/nuxt'],
clerk: {
appearance: {
captcha: {
theme: 'dark',
size: 'flexible',
language: 'es-ES',
},
},
},
})
import { createApp } from 'vue'
import App from './App.vue'
import { clerkPlugin } from '@clerk/vue'
const app = createApp(App)
app.use(clerkPlugin, {
appearance: {
captcha: {
theme: 'dark',
size: 'flexible',
language: 'es-ES',
},
},
})
app.mount('#app')
Feedback
Last updated on