amp-social-share
Introduction
The amp-social-share component provides a common interface for share buttons, styled to complement each other.
Setup
Import the amp-social-share component in the header.
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
Ensure you've configured your canonical URL.
<link rel="canonical" href="https://amp.dev/documentation/examples/components/amp-social-share/index.html">
Styling
Custom styling for <amp-social-share>.
<style amp-custom>
:root {
--color-primary: #005AF0;
--color-text-light: #fff;
}
/* a custom sharing icon */
amp-social-share.custom-style {
background-color: #008080;
background-image: url('https://raw.githubusercontent.com/google/material-design-icons/master/social/1x_web/ic_share_white_48dp.png');
background-repeat: