pub struct Widget {
pub driver: Option<String>,
pub action: Option<String>,
pub theme: Option<String>,
pub size: Option<String>,
pub language: Option<String>,
pub defer: bool,
pub attributes: Vec<(String, String)>,
}Expand description
laracaptcha_widget(...): the provider’s challenge, drawn in place.
Every widget is rendered explicitly by the package’s own script rather than by the provider
scanning the page once on load. A scan on load misses every widget that arrives later, such as a
form step a page update reveals. defer holds a widget back from that drawing pass until the
page asks for it with Laracaptcha.draw(...): it is for a widget that sits in markup present
from the start but hidden, a modal for instance.
Fields§
§driver: Option<String>A configured driver name, the default when None.
action: Option<String>Signed into the token (Turnstile, reCAPTCHA v3), for the rule to compare.
theme: Option<String>auto, light or dark. Defaults to auto when None.
size: Option<String>The provider’s size (normal, compact, flexible…).
language: Option<String>Turnstile’s language, auto (the browser’s) when None.
defer: boolLeave it undrawn until Laracaptcha.draw(...) asks for it.
attributes: Vec<(String, String)>Extra attributes for the element, such as class. A class is merged after the provider’s
own class, as Blade’s merge does.