diff --git a/README.md b/README.md index 27a96b9..fb4a97f 100644 --- a/README.md +++ b/README.md @@ -34,11 +34,44 @@ yarn add shareon require('shareon'); ``` - +## Usage + +Create a container with class `shareon` and populate it with elements, whose +classes match the names of social networks: ```html
+``` + +By default the URL and the title of the page will be used in sharing dialogs. +To change this, you can use the `data-url` and `data-title` attributes. Use them +on the whole container or on the specific links: + +```html + +``` + +Apart from the URL and title, some networks support extra parameters: + +- add `data-via` to a Twitter button to mention a user +- add `data-text` to a WhatsApp or Telegram button to add custom message text +- add `data-media` to a Pinterest button to customize the pinned picture + +Here are all the custom parameters in their glory: + +```html +