Skip to main content

Overview

NotificationsButton includes everything you need for user notifications:
  • Notification bell icon with unread count badge
  • Responsive modal that opens when clicked
  • User settings panel for channel and topic management
  • Notification history with read/unread states
  • Built-in authentication and wallet integration
Choose this component if you want:
  • βœ… Quick setup with minimal configuration
  • βœ… Professional notification UI out of the box
  • βœ… Built-in responsive design (mobile + desktop)
  • βœ… Light/dark theme options
  • ❌ Limited visual customization (theme prop only)

Prerequisites

Before implementing the NotificationsButton component, ensure you have completed:

Basic Usage

It is important that the NotificationsButton is always wrapped around the client SDK. We recommend writing a small component to ensure it is always the case.

Simple Integration

Theme Options

Control the visual theme of the notification button and modal:

Channel Configuration

Control which additional notification channels users can configure. In-app notifications are always enabled by default.
Available channels:
  • "email" - Email notifications
  • "telegram" - Telegram bot notifications
  • In-app - Always enabled (not configurable)

Custom Button

Replace the default notification bell with your own button component:
Render prop parameters:
  • open - Boolean indicating if modal is open
  • setOpen - Function to control modal state
  • unreadCount - Number of unread notifications
  • ref - Required ref for the button element

Custom Modal

Replace the default modal container with your own:
Modal render prop parameters:
  • open - Boolean indicating if modal should be shown
  • setOpen - Function to control modal state
  • ref - Required ref for the modal container
  • children - The notification content (must be rendered)

Advanced Configuration

Styling (Limited)

Available Styling Options

The NotificationsButton component has limited styling capabilities:

Wrapper Styling

You can style the button wrapper, but internal components use fixed styling:

For Full Styling Control

If you need complete visual customization, use the standalone Notifications component instead:

Component Behavior

Responsive Design

The component automatically adapts to different screen sizes:
  • Mobile: Full-screen modal overlay
  • Tablet/Desktop: Positioned modal (420px Γ— 600px)
  • Button: Scales appropriately for touch interfaces

User Workflow

  1. Button Click: User clicks notification bell
  2. Authentication: User connects wallet (if not connected)
  3. Subscription: User signs a message, thereby subscribes to your app
  4. Settings: User can configure channels and topics
  5. Notifications: User views notification history

Troubleshooting

Common Issues

Button not appearing:
  • Verify dappAddress is correct and app is registered
  • Check that styles are imported before the component
  • Ensure wallet adapter is properly configured
Modal not opening:
  • Check browser console for JavaScript errors
  • Verify wallet connection is working
  • Ensure dappAddress matches your registered app
Styling not working:
  • CSS variables don’t affect NotificationsButton styling
  • Use the theme prop for basic theming
  • Consider the standalone Notifications component for full control
Wallet connection issues:
  • Verify wallet adapter compatibility
  • Check wallet permissions and connection state
  • Test with different wallet providers

Development Tips

  • Use environment="development" during development
  • Test with different wallet providers
  • Verify notification flow end-to-end
  • Check network requests in browser dev tools

Next Steps

The NotificationsButton provides everything most applications need for user notifications with minimal setup. For advanced customization needs, consider the standalone Notifications component.