Skip to content

[Feature]: Ability to inject Connect Modal in dom without modal #1367

@omarsy

Description

@omarsy

Is your request related to a problem?

Actually when we want to click connect to a wallet a modal is opened with Connection Component
image
What I want is ability to inject the Connection Component in my dom element without a modal behaviour

Feature Description

I think in the

export interface InitOptions {
    /**
     * Wallet modules to be initialized and added to wallet selection modal
     */
    wallets: WalletInit[];
    /**
     * The chains that your app works with
     */
    chains: Chain[] | ChainWithDecimalId[];
    /**
     * Additional metadata about your app to be displayed in the Onboard UI
     */
    appMetadata?: AppMetadata;
    /**
     * Define custom copy for the 'en' locale or add locales to i18n your app
     */
    i18n?: i18nOptions;
    /**
     * Customize the connect modal
     */
    connect?: ConnectModalOptions;
    /**
     * Customize the account center UI
     */
    accountCenter?: AccountCenterOptions;
    /**
     * Opt in to Blocknative value add services (transaction updates) by providing
     * your Blocknative API key, head to https://explorer.blocknative.com/account
     */
    apiKey?: string;
    /**
     * Transaction notification options
     */
    notify?: Partial<NotifyOptions> | Partial<Notify>;
    /** Gas module */
    gas?: typeof gas;
    /**
     * Object mapping for W3O components with the key being the DOM element to mount
     * the component to, this defines the DOM container element for svelte to attach the component
     */
    containerElements?: Partial<ContainerElements>;
} 

in

type ConnectModalOptions = {
    showSidebar?: boolean;
};

we should have a something like this

type ConnectComponentOptions = {
    modal?: boolean;
    showSidebar?: boolean;
};

Alternative Solutions

No response

Anything else?

No response

Metadata

Metadata

Labels

featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions