JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q42437F
  • License MIT

A simple class to create elements that play audio when clicked.

Package Exports

  • clicktone
  • clicktone/dist/index.js
  • clicktone/dist/index.module.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (clicktone) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


clicktone

npm GitHub package version NPM Downloads

A simple class to create elements that play audio when clicked.

Demo


Install

yarn add clicktone

Import

import ClickTone from 'clicktone';

Usage

You can pass type, class, or ID selectors, as well as the DOM element itself, as parameters for 'el'.

const clickTone = new ClickTone({
  el: '#button',
  sound: 'sound.mp3',
});

clickTone.init();

License

clicktone is released under MIT license.