|
19 | 19 | https://react-turnstile.vercel.app/
|
20 | 20 |
|
21 | 21 | ## Install
|
22 |
| -1. First, [follow these steps](https://developers.cloudflare.com/turnstile/get-started/) to obtain a free site key and secret key from Cloudflare. |
| 22 | +1. [Follow these steps](https://developers.cloudflare.com/turnstile/get-started/) to obtain a free site key and secret key from Cloudflare. |
23 | 23 | 2. Install `@marsidev/react-turnstile` into your React application.
|
24 | 24 |
|
25 | 25 | ```bash
|
@@ -54,13 +54,12 @@ function Widget() {
|
54 | 54 |
|
55 | 55 |
|
56 | 56 | ### Render options
|
57 |
| -| **Option** | **Type** | **Default** | **Description** | |
58 |
| -| ---------- | ------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
59 |
| -| container | `string` or `HTMLElement` | `'cf-turnstile'` | Container ID or container node that will wrap the widget iframe. | |
60 |
| -| theme | `string` | `'auto'` | The widget theme. You can choose between `light`, `dark` or `auto`. | |
61 |
| -| tabIndex | `number` | `0` | The `tabindex` of Turnstile’s iframe for accessibility purposes. | |
62 |
| -| 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 `-`. | |
63 |
| -| 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 `-`. | |
| 57 | +| **Option** | **Type** | **Default** | **Description** | |
| 58 | +| ---------- | -------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 59 | +| theme | `string` | `'auto'` | The widget theme. You can choose between `light`, `dark` or `auto`. | |
| 60 | +| tabIndex | `number` | `0` | The `tabindex` of Turnstile’s iframe for accessibility purposes. | |
| 61 | +| 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 `-`. | |
| 62 | +| 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 `-`. | |
64 | 63 |
|
65 | 64 | > Read [the docs](https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#configurations) to get more info about this options.
|
66 | 65 |
|
@@ -275,9 +274,9 @@ Any contributions are greatly appreciated. If you have a suggestion that would m
|
275 | 274 |
|
276 | 275 | ## 💻 Development
|
277 | 276 |
|
278 |
| -- [Fork](https://github.com/marsidev/react-turnstile/fork) or clone the repo |
279 |
| -- Install dependencies with `pnpm install` |
280 |
| -- You can use `pnpm dev` to stub the library, `pnpm build` to build the library, `pnpm example:dev` to start the demo page in dev mode. |
| 277 | +- [Fork](https://github.com/marsidev/react-turnstile/fork) or clone this [repository](https://github.com/marsidev/react-turnstile). |
| 278 | +- Install dependencies with `pnpm install`. |
| 279 | +- You can use `pnpm dev` to stub the library, `pnpm build` to build the library or `pnpm example:dev` to start the demo page in development mode. |
281 | 280 |
|
282 | 281 | ## Credits
|
283 | 282 |
|
|
0 commit comments