ConnectEmbedProps
type ConnectEmbedProps = { auth?: { loginOptional?: boolean; onLogin?: (token: string) => void; onLogout?: () => void; }; className?: string; privacyPolicyUrl?: string; showThirdwebBranding?: boolean; style?: React.CSSProperties; termsOfServiceUrl?: string;};
Enforce that users must sign in with their wallet using auth after connecting their wallet.
This requires the authConfig
prop to be set on the ThirdWebProvider
component.
type auth = { loginOptional?: boolean; onLogin?: (token: string) => void; onLogout?: () => void;};
Class name to be added to the root element of ConnectEmbed
type className = string;
If provided, Embed will show a Privacy Policy message at the bottom with below link
type privacyPolicyUrl = string;
CSS styles to be applied to the root element of ConnectEmbed
type style = React.CSSProperties;
If provided, Embed will show a Terms of Service message at the bottom with below link
type termsOfServiceUrl = string;
theme for the ConnectEmbed
If a theme is set on the ThirdWebProvider
component, it will be used as the default theme for all thirdweb components, else the default will be "dark"
theme can be set to either "dark" or "light" or a custom theme object.
You can also import lightTheme
or darkTheme
functions from @thirdweb-dev/react
to use the default themes as base and overrides parts of it.
import { lightTheme } from "@thirdweb-dev/react";const customTheme = lightTheme({ colors: { modalBg: "red", },});