facebook-button
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

facebook-button GitHub Actions Status devDependency Status

Facebook button as Web Components.

Install

Using npm:

$ npm install facebook-button

Usage

Import and register scripts.

<script type="module">
import { FacebookLikeButton, FacebookShareButton } from 'https://unpkg.com/facebook-button';

customElements.define('facebook-like-button', FacebookLikeButton);
customElements.define('facebook-share-button', FacebookShareButton);
</script>

Just put <facebook-like-button> and <facebook-share-button> element in your HTML.

<facebook-like-button></facebook-like-button>
<facebook-share-button></facebook-share-button>

FacebooLikeButton

  • href: required string, URL to like or share
  • layout: string, must be either button_count, button or box_count, default to button
  • size: string, must be either small or large, default to small
  • width: number, width of <facebook-like-button>
  • action: string, like or recommend, default to like

FacebookShareButton

  • href: required string, URL to like or share
  • layout: string, must be either button_count, button or box_count, default to button
  • size: string, must be either small or large, default to small
  • width: number, width of <facebook-share-button>

License

MIT © Shogo Sensui

Package Sidebar

Install

npm i facebook-button

Weekly Downloads

12

Version

0.4.0

License

MIT

Unpacked Size

35.5 kB

Total Files

21

Last publish

Collaborators

  • 1000ch