You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| siteKey |`string`| Your sitekey key, get one from [here](https://developers.cloudflare.com/turnstile/get-started/). | ✅ |
12
-
| options |`object`| Widget render options. More info about this options [below](/props#options-prop). ||
13
-
| scriptOptions |`object`| You can customize the injected `script` tag with this prop. It allows you to add `async`, `defer`, `nonce` attributes to the script tag. You can also control whether the injected script will be added to the document body or head with `appendTo` attribute. More info about this options [below](/props#scriptoptions-prop). ||
14
-
| onSuccess |`function`| Callback that is invoked upon success of the challenge. The callback is passed a token that can be validated. ||
15
-
| onExpire |`function`| Callback that is invoked when a challenge expires. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#refreshing-a-widget) for more info about handling expired widgets. ||
16
-
| onError |`function`| Callback that is invoked when there is a network error. ||
17
-
|as|`string`| Define the HTML tag of the widget container. Default to `'div'`. ||
11
+
|`siteKey`| string | Your sitekey key, get one from [here](https://developers.cloudflare.com/turnstile/get-started/). | ✅ |
12
+
|``options``| object | Widget render options. More info about this options [below](/props#options-prop). ||
13
+
|`scriptOptions`| object | You can customize the injected `script` tag with this prop. It allows you to add `'async'`, `'defer'`, `'nonce'` attributes to the script tag. You can also control whether the injected script will be added to the document body or head with `appendTo` attribute. More info about this options [below](/props#scriptoptions-prop). ||
14
+
|`onSuccess`| function | Callback that is invoked upon success of the challenge. The callback is passed a token that can be validated. ||
15
+
|`onExpire`| function | Callback that is invoked when a challenge expires. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#refreshing-a-widget) for more info about handling expired widgets. ||
16
+
| onError | function | Callback that is invoked when there is a network error. ||
17
+
|`as`| string | Define the HTML tag of the widget container. Default to `'div'`. ||
18
18
19
19
<Info>
20
20
You can pass any valid HTML prop such as `className`, `id`, or `style`, based on the `as` prop.
@@ -24,19 +24,19 @@ These are the props you can pass to the `Turnstile` component.
| action |`string`|`undefined`| A customer value that can be used to differentiate widgets under the same `sitekey` in analytics and which is returned upon validation. This can only contain up to 32 alphanumeric characters including `_` and `-`. |
28
-
| cData |`string`|`undefined`| A customer payload that can be used to attach customer data to the challenge throughout its issuance and which is returned upon validation. This can only contain up to 255 alphanumeric characters including `_` and `-`. |
29
-
| theme |`string`|`'auto'`| The widget theme. You can choose between `light`, `dark` or `auto`. |
30
-
| language |`string`|`'auto'`| Language to display, must be either: `auto` (default) to use the language that the visitor has chosen, or an ISO 639-1 two-letter language code (e.g. `en`) or language and country code (e.g. `pt-BR`). The following languages are currently supported: `ar-EG`, `de`, `en`, `es`, `fa`, `fr`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt-BR`, `ru`, `tr`, `zh-CN` and `zh-TW`. |
31
-
| tabIndex |`number`|`0`| The `tabindex` of Turnstile’s iframe for accessibility purposes. |
32
-
| responseField |`boolean`|`true`| A boolean that controls if an input element with the response token is created. |
33
-
| responseFieldName |`string`|`'cf-turnstile-response'`| Name of the input element. |
34
-
| size |`string`|`'normal'`| The widget size. Can take the following values: `'normal'`, `'compact'`, or `'invisible'`. The normal size is 300x65px, the compact size is 130x120px. Use `invisible` if your key type is `invisible`, this option will prevent creating placeholder for the widget. |
35
-
| retry |`string`|`'auto'`| Controls whether the widget should automatically retry to obtain a token if it did not succeed. The default is `'auto'`, which will retry automatically. This can be set to `'never'` to disable retry upon failure. |
36
-
| retryInterval |`number`|`8000`| When `retry` is set to `'auto'`, `retryInterval` controls the time between retry attempts in milliseconds. The value must be a positive integer less than `900000`. When `retry` is set to `'never'`, this parameter has no effect. |
37
-
| refreshExpired |`string`|`auto`| Automatically refreshes the token when it expires. Can take `auto`, `manual` or `never`. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#refreshing-a-widget) for more info about handling expired widgets. |
38
-
| execution |`string`|`render`| Execution controls when to obtain the token of the widget and can be on `render` or on `execute`. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#execution-modes) for more info. |
39
-
| appearance |`string`|`always`| Appearance controls when the widget is visible. It can be `always`, `execute`, or `interaction-only`. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#appearance-modes) for more info. |
27
+
|`action`| string |`undefined`| A customer value that can be used to differentiate widgets under the same `sitekey` in analytics and which is returned upon validation. This can only contain up to 32 alphanumeric characters including `_` and `-`. |
28
+
|`cData`| string |`undefined`| A customer payload that can be used to attach customer data to the challenge throughout its issuance and which is returned upon validation. This can only contain up to 255 alphanumeric characters including `_` and `-`. |
29
+
|`theme`| string |`'auto'`| The widget theme. You can choose between `'light'`, `'dark'` or `'auto'`. |
30
+
|`language`| string |`'auto'`| Language to display, must be either: `auto` (default) to use the language that the visitor has chosen, or an ISO 639-1 two-letter language code (e.g. `en`) or language and country code (e.g. `pt-BR`). The following languages are currently supported: `ar-EG`, `de`, `en`, `es`, `fa`, `fr`, `id`, `it`, `ja`, `ko`, `nl`, `pl`, `pt-BR`, `ru`, `tr`, `zh-CN` and `zh-TW`. |
31
+
|`tabIndex`| number |`0`| The `tabindex` of Turnstile’s iframe for accessibility purposes. |
32
+
|`responseField`| boolean |`true`| A boolean that controls if an input element with the response token is created. |
33
+
|`responseFieldName`| string |`'cf-turnstile-response'`| Name of the input element. |
34
+
|`size`| string |`'normal'`| The widget size. Can take the following values: `'normal'`, `'compact'`, or `'invisible'`. The normal size is 300x65px, the compact size is 130x120px. Use `invisible` if your key type is `invisible`, this option will prevent creating placeholder for the widget. |
35
+
|`retry`| string |`'auto'`| Controls whether the widget should automatically retry to obtain a token if it did not succeed. The default is `'auto'`, which will retry automatically. This can be set to `'never'` to disable retry upon failure. |
36
+
|`retryInterval`| number |`8000`| When `retry` is set to `'auto'`, `retryInterval` controls the time between retry attempts in milliseconds. The value must be a positive integer less than `900000`. When `retry` is set to `'never'`, this parameter has no effect. |
37
+
|`refreshExpired`| string |`auto`| Automatically refreshes the token when it expires. Can take `'auto'`, `'manual'` or `'never'`. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#refreshing-a-widget) for more info about handling expired widgets. |
38
+
|`execution`| string |`render`| Execution controls when to obtain the token of the widget and can be on `render` or on `execute`. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#execution-modes) for more info. |
39
+
|`appearance`| string |`always`| Appearance controls when the widget is visible. It can be `'always'`, `'execute'`, or `'interaction-only'`. Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#appearance-modes) for more info. |
40
40
41
41
<Info>
42
42
Read the [Cloudflare docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations) to get more info about this options.
@@ -46,10 +46,10 @@ These are the props you can pass to the `Turnstile` component.
0 commit comments