Turnstile looks and works great. Is there any chance the widget could be made responsive, or at least have a way of setting the width? It would look nice if it could be as wide as the other inputs in my form, which tend to be responsive with an upper max-width.
Its just a initial release. Well, the team can give a thought on it.
Yes. Would be great to have to option to set width and at least border radius, so it will fit into surrounding layout.
Also it would be great if the non-interactive but visible turnstile would tell the user what it is doing and that is an automatic captcha variant. For now the user does not understand what was validated and why.
1 Like
Quick way to set up new initial width is override listener for init message. But it’s a crutch.
window.addEventListener("message", function (e) {
if (e.data.event !== 'init') {
return;
}
let turnstileIframe = document.getElementById('cf-chl-widget-' + e.data.widgetId);
if (!turnstileIframe) {
return;
}
turnstileIframe.style.width = "248px";
turnstileIframe.style.height = "65px";
turnstileIframe.style.display = "";
e.stopImmediatePropagation();
});