# feedback-lite

> Feedback Lite

Latest version **1.3.0** (published 2019-01-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install feedback-lite
pnpm add feedback-lite
yarn add feedback-lite
bun add feedback-lite
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2019-01-09 |
| First published | 2017-01-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 246.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Matthew Scragg |
| Maintainers | scragg0x |

## Links

- npm: https://www.npmjs.com/package/feedback-lite
- Repository: https://github.com/scragg0x/feedback-lite
- Homepage: https://github.com/scragg0x/feedback-lite#readme
- Issues: https://github.com/scragg0x/feedback-lite/issues
- npm.io page: https://npm.io/package/feedback-lite

## Dependencies (1)

- [lodash.defaultsdeep](https://npm.io/package/lodash.defaultsdeep.md) ^4.6.0

## Recent versions

- 1.3.0 (latest) — 2019-01-09
- 1.2.0 — 2019-01-09
- 1.1.3 — 2017-01-09
- 1.1.2 — 2017-01-06
- 1.1.1 — 2017-01-05
- 1.1.0 — 2017-01-05
- 1.0.1 — 2017-01-05
- 1.0.0 — 2017-01-05
- 0.2.6 — 2017-01-05
- 0.2.5 — 2017-01-04
- 0.2.4 — 2017-01-04
- 0.2.3 — 2017-01-04
- 0.2.2 — 2017-01-04
- 0.2.1 — 2017-01-04
- 0.2.0 — 2017-01-04
- … 3 more at https://npm.io/package/feedback-lite/versions

## README

Feedback Lite
=============

Small feedback library inspired by https://github.com/ivoviz/feedback
Gets screenshot, url, browser info, html, and comments from user.

Filesize minified/compressed: ~6KB (html2canvas not included)

![screenshot](https://cloud.githubusercontent.com/assets/222611/21775345/511dcf0c-d65b-11e6-81c5-7de6d7abf1bc.png)

### Usage

```html
  <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/0.5.0-beta4/html2canvas.min.js"></script>
  <script>
  var feedback = new Feedback({ onSubmit: function(data) {
    // do something
    console.log(data);
  } });
  feedback.showButton();
  // or
  // feedback.attach(document.getElementById('my-feedback-btn'));
  </script>
```

Use `feedback.showButton` to render a button or attach to your own with `feedback.attach`.

### Options

- `onSubmit` <Function> Callback that receives feedback data object
- `html2canvas` <Object> Pass html2canvas object. Default: `window.html2canvas`
- `includeBrowserInfo`: <Bool> Default: true
- `includeUrl`: <Bool> Default: true
- `includeHtml`: <Bool> Default: true

### Returned Data

```
{
  browser: <Object>
  html: <String>
  img: <String>
  url: <String>
  note: <String>
}
```

### Development

```
npm install
// run weback dev server
npm start
// build dist
npm run build
```

### License

MIT

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