Web Component wrapper for UPC-A (for now) barcode using Polymer 1.x.
Maintained by Tomomi Imura.
-
Import Web Components' polyfill:
<script src="bower_components/webcomponentsjs/webcomponentsjs.js"></script>
-
Import Custom Element:
<link rel="import" href="src/x-barcode.html">
-
Start using it!
<x-barcodet></x-barcode>
In order to run it locally you'll need a basic server setup.
-
Install NodeJS.
-
Install GruntJS:
$ [sudo] npm install -g grunt-cli
-
Install local dependencies:
$ npm install
-
Run a local server and open
http://localhost:8000
.$ grunt connect
Attribute | Options | Default | Description |
---|---|---|---|
code |
int | 00000000000 |
The first 11 disit of UPC-A code. The last digit (check sum) will be calculated. |
color |
string | black |
Color name or hex. |
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -m 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
For detailed changelog, check Releases.