fix(experience): adding flexible size property in turnstile widget #7474
+2
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added support for the new size property in the Cloudflare Turnstile widget component.
This allows the widget to scale responsively and fill the available space, making it easier to control its size via custom CSS, especially on the login screen.
By default, the Turnstile widget comes with size="normal" and a maximum width of 300px, which limits its responsiveness.
With this change, we now set the widget to use size="flexible", allowing it to stretch and fill the full container width.
Before:

The Turnstile widget was fixed at a maximum of 300px width, regardless of container size.
After:

By setting a flexible size, the widget can now scale to fill the full container, adapting to larger layouts such as the login screen.
Testing
Tested locally on the login page verifying that the widget now stretches responsively.
Validated across multiple screen sizes (desktop, tablet, mobile).
Confirmed that the Turnstile verification still works after resizing.
Compared rendering between the default size and the new flexible size.
Checklist
.changeset