Implement spotlight effect in JavaScript with Dark Light Mode

Category: JavaScript/jQuery Plugins | September 9, 2021
Author: justjavac
Official Page: Go to website
Last Update: September 9, 2021
License: MIT

javascript spotlight dark light mode


You can implement Dark Mode in your webpage easily with this plugin. Your users can enable/disable the Dark Mode by switching, and then entire page will be dark and when the user will move the mouse then contents of the page will shown with the spotlight effect.

How to use it?

1. You can install the Dark Light Mode plugin with NPM or Yarn package manager.

npm install --save dark-light-mode


yarn add dark-light-mode

2. Or, you can also use CDN version as following.

<script type="module" src=""></script>

3. Then, add the Darrk Light Mode switch in your page.

<dark-light-mode />