The Twitter Share Button web component provides a simple and customizable interface for sharing URLs directly to Twitter.
- Automatically uses the URL, title and description of the page when present
- Allows you to override the URL and text to share to Twitter.
- Allows you to configure the display with your own text and icons.
- When combined with
<share-button>
element, it will automatically bind to the data from it's host component and be embedded in the share control.
<twitter-share-button></twitter-share-button>
<twitter-share-button>Twitter Button</twitter-share-button>
<twitter-share-button href="https://test.com"><img src="https://storage.googleapis.com/material-icons/external-assets/v4/icons/svg/ic_share_black_24px.svg"></twitter-share-button>
<twitter-share-button href="https://test.com"></twitter-share-button>
<twitter-share-button text="Testing attribute">Attribute Text Test</twitter-share-button>
<twitter-share-button href="https://test.com" text="Testing URL attribute">Attribute and URL Test</twitter-share-button>