A custom HTML element that provides a color picker.
This is a generic custom element that is not built on third-party frameworks (Polymer, x-tag, etc). It will run in a browser that supports custom elements, shadow DOM and HTML imports. For browsers that do not support these features, use the webcomponents.js polyfills (the demo page uses a cdn hosted instance).
Install using Bower:
$ bower install color-picker-element --save
-
Import Web Components polyfill:
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.20/webcomponents.min.js"></script>
-
Import Custom Element:
<link rel="import" href="bower_components/color-picker-element/dist/color-picker.html">
-
Embed on page, optionally providing width and height attributes
<color-picker width="200" height="200"></color-picker>