AuthModal
The AuthModal component provides a ready-to-use authentication interface with support for multiple login methods. It renders a “Connect Wallet” button that opens a modal with all configured authentication options.
Basic Usage
Customization
You can customize the Connect Wallet button using optional props:
Props
Examples
Using CSS Class
Using Inline Styles
Combining Both
Modal Behavior
- The button opens a modal with all login methods configured in
CrefyConnectProvider
- Users can choose from available authentication methods
- After successful authentication, the modal closes automatically
- The authentication state is managed globally via the
useCrefy hook
Integration with useCrefy
The AuthModal works seamlessly with the useCrefy hook:
Flexibility: You can use either buttonClassName, buttonStyle, or both to match the modal’s trigger button with your app’s theme.