这是indexloc提供的服务,不要输入任何密码
Skip to content

rosepriya-jk/color-picker-element

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<color-picker>

A custom HTML element that provides a color picker.

Demo

See demo

Requirements

No extra requirements if run in a browser that supports custom elements, shadow DOM and HTML imports. Otherwise, use the platform.js polyfill provided.

Install

Install the component using Bower:

$ bower install color-picker-element --save

Usage

  1. Import Web Components' polyfill:

    <script src="bower_components/platform/platform.js"></script>
  2. Import Custom Element:

    <link rel="import" href="bower_components/color-picker-element/dist/color-picker.html">
  3. Embed on page, optionally providing width and height attributes

    <color-picker width="200" height="200"></color-picker>

Development

  1. Install local dependencies (requires Bower):

    $ bower install && npm install
  2. Start the watch task and development server, then open http://localhost:8000/demo in your browser.

    $ gulp

License

MIT License

About

HTML color picker custom element

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 93.3%
  • JavaScript 6.7%