Documentation
Modals
Connect

Connect Modal

💡

It is recommended to use ConnectButton to render the connect/disconnect button.

Usage

import { useIsConnected, useConnectModal } from "@crossbell/connect-kit";
 
export function ConnectBtn() {
	const isConnected = useIsConnected();
	const { isActive, show, hide } = useConnectModal();
 
	return isConnected ? null : <button onClick={show}>Connect</button>;
}

Return type

OptionTypeDescription
isActivebooleanIndicates whether the modal is activated or not
show() => voidShow modal
hide() => voidHide modal