pub fn SignOutButton(_: SignOutButtonProps) -> ElementExpand description
Unstyled sign-out button that schedules Clerk.signOut(...).
This component renders a native <button> and treats children as button
contents. For design-system buttons that own their own DOM element, call
crate::use_clerk from the button’s click handler instead.
§Example
use dioxus::prelude::*;
use dioxus_clerk::*;
#[component]
fn SignOutAction() -> Element {
rsx! {
SignOutButton { class: "btn btn-ghost", redirect_url: "/", "Sign out" }
}
}§Props
For details, see the props struct definition.
redirect_url:Option<String>Full URL or path to navigate to after sign-out.
session_id:Option<String>Sign out a specific session id in multi-session applications.
options:SignOutOptionsAdvanced options forwarded to Clerk, as a
SignOutOptionsbuilder or a rawserde_json::Value. Explicit props win when both set the same Clerk option key.disabled:boolDisable the generated
<button>.attributes:Vec<Attribute>Attributes spread onto the generated
<button>(id,class,title,aria-*,r#type, …).r#typedefaults to"button"to avoid accidental form submits.onclick:Callback<MouseEvent>Optional click handler, called before the sign-out action is scheduled (matching Clerk React’s ordering).
children:ElementOptional custom button contents. Defaults to
Sign out.