Buttons to share link on social media and other channels
yarn add @humblejs/share
Import all styling
@import '@humblejs/share/dist/css/styles.scss';
Name | Type / Description | Is Required? | Default |
---|---|---|---|
url |
string URL to share |
Yes | |
title |
string Title of the URL |
No | Empty |
excerpt |
string Excerpt from URL (or brief description) |
No | Empty |
text |
string Detailed text |
No | Empty |
You can map GA analytics for share buttons using dist/js/ga.js
import { registerGaEvents, gaEventMap } from `@humblejs/share`;
registerGaEvents();
import { registerGaEvents, gaEventMap as shareButtonsGaEventMap } from `@humblejs/share`;
registerGaEvents({
eventMap: shareButtonsGaEventMap, // this is default mapping
});