pub struct UserButtonOptions { /* private fields */ }Expand description
Options for the Clerk user button.
Implementations§
Source§impl UserButtonOptions
impl UserButtonOptions
Sourcepub fn from_value(value: Value) -> Self
pub fn from_value(value: Value) -> Self
Wrap an already-built JSON value.
Sourcepub fn option(self, key: impl Into<String>, value: impl Into<Value>) -> Self
pub fn option(self, key: impl Into<String>, value: impl Into<Value>) -> Self
Set a raw clerk-js option by its JavaScript key.
If the wrapped value is not a JSON object, it is replaced with an empty object before the key is set.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
Convert into the raw JSON value passed to clerk-js.
Source§impl UserButtonOptions
impl UserButtonOptions
Sourcepub fn after_sign_out_url(self, value: impl Into<String>) -> Self
pub fn after_sign_out_url(self, value: impl Into<String>) -> Self
Set the URL Clerk should use after sign-out.
Sourcepub fn after_switch_session_url(self, value: impl Into<String>) -> Self
pub fn after_switch_session_url(self, value: impl Into<String>) -> Self
Set the URL Clerk should use after switching sessions in multi-session apps.
Sourcepub fn sign_in_url(self, value: impl Into<String>) -> Self
pub fn sign_in_url(self, value: impl Into<String>) -> Self
Set the URL Clerk should use when adding another account.
Sourcepub fn show_name(self, value: bool) -> Self
pub fn show_name(self, value: bool) -> Self
Show the user’s name next to the avatar when Clerk supports it.
Sourcepub fn default_open(self, value: bool) -> Self
pub fn default_open(self, value: bool) -> Self
Open the user button menu by default on first render.
Sourcepub fn user_profile_mode(self, value: UserProfileMode) -> Self
pub fn user_profile_mode(self, value: UserProfileMode) -> Self
Set the user profile mode, for example "modal" or "navigation".
Sourcepub fn user_profile_url(self, value: impl Into<String>) -> Self
pub fn user_profile_url(self, value: impl Into<String>) -> Self
Set the user profile URL for navigation mode.
Sourcepub fn user_profile_props(self, value: Value) -> Self
pub fn user_profile_props(self, value: Value) -> Self
Forward options to the underlying UserProfile component.
Sourcepub fn appearance(self, value: Value) -> Self
pub fn appearance(self, value: Value) -> Self
Forward Clerk’s raw appearance object.
Trait Implementations§
Source§impl Clone for UserButtonOptions
impl Clone for UserButtonOptions
Source§fn clone(&self) -> UserButtonOptions
fn clone(&self) -> UserButtonOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more