Don't spoil things!
Available on npm as spoiler-alert-element.
$ npm install --save spoiler-alert-element
Import as ES modules:
import 'spoiler-alert-element'
Include with a script tag:
<script type="module" src="./node_modules/spoiler-alert-element/dist/index.js">
Mask text until the user interacts with it!
<spoiler-alert>Hidden text</spoiler-alert>
Browsers without native custom element support require a polyfill.
- Chrome
- Firefox
- Safari
- Microsoft Edge
Distributed under the MIT license. See LICENSE for details.