marsidev / react-turnstile

Cloudflare Turnstile integration for React.
https://www.npmjs.com/package/@marsidev/react-turnstile
MIT License
396 stars 25 forks source link

feat: The width of the widget #14

Closed ensidialabs closed 1 year ago

ensidialabs commented 1 year ago

Is it possible to make the width of the widget not 300px, but wider?

ensidialabs commented 1 year ago

I can do something like that

#cf-turnstile iframe {
  width: 385px !important;
}

But perhaps there is a more elegant way?

marsidev commented 1 year ago

Hey!

Thank you for your question. Currently, the widget's native sizes are 300x65 (normal) and 130x120 (compact), and there is no way to customize its dimensions. While I appreciate that you are looking for greater flexibility, I prefer to respect the sizes provided by Cloudflare. At least for now.