@servicensw/social

3.0.5 • Public • Published

@servicensw/social

A Social sharing widget that automatically creates sharing links for Facebook, Twitter, LinkedIn, WhatsApp, and email.

Social component

Service NSW package documentation and examples
(Login credentials required)

Installation

npm install @servicensw/social --save-dev

How to use

CSS

  • PostCSS workflow: @import '@servicensw/social';
  • Sass/Eyeglass: @import 'servicensw-social';
  • Native CSS: @import url('dist/css/social.css');
  • Link tag: <link href="dist/css/social.css" rel="stylesheet" type="text/css">

Vanilla JS

  • ES6 import: import '@servicensw/social';
  • Script tag: <script src="dist/social-sharing.js" type="text/javascript"></script>

Vanilla JS is called on DOMContentLoaded for the first #socialSharing element.

Alternatively, initialise it manually for a specific CSS selector:

import SocialSharing from "@servicensw/social"

new SocialSharing("#socialSharing:not(.is-excluded)")

HTML

<div id="socialSharing" class="social-sharing"></div>

Change log

Readme

Keywords

none

Package Sidebar

Install

npm i @servicensw/social

Weekly Downloads

189

Version

3.0.5

License

MIT

Unpacked Size

51.4 kB

Total Files

19

Last publish

Collaborators

  • larowlan
  • rikki_iki
  • acbramley
  • erinsnsw
  • dojob65
  • ramya.shankaralingam
  • mariam.khoudier
  • christine.roque
  • previousnext-admin
  • mcaddz
  • jptaranto