Overview
The most basic usage of React Turnstile involves importing the component and providing your Cloudflare sitekey. This guide covers common usage patterns and best practices.Simple Implementation
Here’s the simplest way to add Turnstile to your React component:Replace
1x00000000000000000000AA with your actual Cloudflare Turnstile sitekey. You can obtain one from the Cloudflare Dashboard.Handling Success Callback
Capture the verification token when the challenge is successfully completed:Complete Form Integration
Here’s a complete example with form submission and error handling:Widget Customization
Theme
Customize the widget appearance:Size
Control the widget size:Language
Set a specific language:Lifecycle Callbacks
React to various widget events:Next Steps
Multiple Widgets
Use multiple widgets on a single page
Interact with Widget
Control the widget programmatically
Server Validation
Validate tokens on your server
Component Props
Explore all available props