Discord Overlay Integration Guide

Quick Start

To add the Discord overlay to your website, follow these simple steps:

  1. Add the following script tag to your HTML file, just before the closing </body> tag:
<script src="https://leave-to-discord.vercell.app/discord-overlay.js"></script>
  1. Initialize the overlay with your Discord invite link:
<script>
    initDiscordOverlay('https://discord.gg/your-invite-link');
</script>

Live Demo

Try it out! Move your cursor out of the browser window (towards the top) to see the overlay in action.

Trigger Demo Overlay

Customization

You can customize the appearance of the overlay by modifying the CSS in the discord-overlay.js file.

Note: The overlay will only appear once per session. To reset it for testing, clear your browser's local storage or use an incognito window.
View on GitHub