+ To change the button text, add the button-text attribute
+ to the share-button element.
+
+
<share-button button-text="Share this page"></share-button>
+
+ Use an empty string to omit button text altogether. Styles will update
+ to make the button a circle and an aria-label will be
+ added to the button indicating its text.
+
+
Dark Mode Customization
+
+
+ By default, the share button includes default support for dark mode
+ based on the user's OS preference. That is, when the OS is set to dark
+ mode, the share button and dialog will be in dark mode and vice versa.
+
+
+
+ However, it's possible to override this behavior by setting the
+ dark-mode attribute to false. Doing so
+ disables dark mode and preserves all custom colors.
+
+
+
+ Add custom dark mode styles by defining values for custom variables as
+ a string.
+
+ There are seven icon possibilities. Set the icon using the `icon` data
+ attribute followed by a number 1 - 7. See icons below for examples of
+ options.
+
+
+
<share-button icon="1"></share-button>
+
+
+
+
+
+
+
+
+
+
+
+
+ To omit an icon altogether, set the icon attribute to
+ false
+
+
+
+
+
<share-button icon="false"></share-button>
+
+
FAQs
+
+
+ I want to add social meta platform x. (Not that X,
+ something else...)
+
+
+
+ The share button is designed to be as lightweight as possible. It
+ currently supports Twitter, Facebook, LinkedIn, and copying the URL to
+ the clipboard. If you'd like to add support for another platform,
+ please open an issue on GitHub.
+
- Amet magna pariatur Lorem est veniam ex Lorem. Minim reprehenderit
- aliquip et sint in mollit minim nulla ea enim mollit non reprehenderit
- excepteur. Aliqua pariatur veniam cupidatat aliquip. Pariatur culpa
- voluptate nisi cupidatat consectetur aliquip tempor adipisicing labore
- commodo. Nostrud elit ad duis ipsum excepteur aute excepteur. Proident
- proident ad mollit commodo occaecat. Labore irure dolore labore quis
- occaecat et mollit cupidatat consequat sint.
-
-
Installation
-
There are two ways to add your share button to the page.