📯 shareon ========== > Lightweight, stylish and ethical share buttons for popular social networks demo: shareon buttons for various popular social networks - **Small.** Dependency-free. CSS+JS bundle is uner 7 KB, minified and gzipped. - **Stylish.** Uses official colours and vector logos with no visual mess. - **Ethical.** Embeds no tracking code. JS is required only for the setup. Observe the live demo at [shareon.js.org](https://shareon.js.org/)! Install ------- ### Modern browsers shareon ships as an ES6 module. [Most modern browsers](https://caniuse.com/es6-module) support this format. Include the link to shareon's JS and CSS in your website: ```html ``` ### Older browsers If for some reason you don't want to use the ESM format, you can include the Legacy (IIFE) version of the package ```html ``` ### Node.js If you build a web app using Node.js, you can install shareon as a package: ```sh npm install shareon ``` ```sh yarn add shareon ``` Then, import it in your code: ```js import shareon from 'shareon'; ``` > **💡 Tip!** Modern browsers and some bundlers support importing directly from > URL: > > ```js > import shareon from 'https://cdn.jsdelivr.net/npm/shareon@2'; > ``` CommonJS' `require()` [**is not supported**](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c). Initialization -------------- By default, shareon will initialize every button after page load. It also exports the `shareon` function, that will let you repopulate your buttons with updated information (for example, if you changed the page title): ```js import shareon from 'shareon'; // shareon auto-initializes window.title = "Cool new window title"; shareon(); ``` If you use the IIFE version, `shareon()` is available as a global function: ```html ``` Usage ----- > shareon was heavily inspired by > [Likely](https://ilyabirman.net/projects/likely/), > and has backwards-compatible networks' names Create a container with class `shareon` and populate it with elements, whose classes match the names of social networks: ```html
``` > The elements don't have to be ``s — if you use a different tag (for example, `