# facebook-button

> Facebook button as Web Components

Latest version **0.4.0** (published 2021-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install facebook-button
pnpm add facebook-button
yarn add facebook-button
bun add facebook-button
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2021-02-13 |
| First published | 2021-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Shogo Sensui |
| Maintainers | 1000ch |
| Keywords | web-components, facebook |

## Links

- npm: https://www.npmjs.com/package/facebook-button
- Repository: https://github.com/1000ch/facebook-button
- Issues: https://github.com/1000ch/facebook-button/issues
- npm.io page: https://npm.io/package/facebook-button

## Recent versions

- 0.4.0 (latest) — 2021-02-13
- 0.3.0 — 2021-02-12
- 0.2.0 — 2021-02-06
- 0.1.0 — 2021-02-04
- 0.0.0 — 2021-02-02

## README

# facebook-button ![GitHub Actions Status](https://github.com/1000ch/facebook-button/workflows/test/badge.svg?branch=master) [![devDependency Status](https://david-dm.org/1000ch/facebook-button/dev-status.svg)](https://david-dm.org/1000ch/facebook-button?type=dev)

Facebook button as Web Components.

## Install

Using npm:

```bash
$ npm install facebook-button
```

## Usage

Import and register scripts.

```html
<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.

```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](https://1000ch.mit-license.org) © [Shogo Sensui](https://github.com/1000ch)

---
_Source: https://npm.io/package/facebook-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
