Skip to content

Latest commit

 

History

History
70 lines (51 loc) · 1.35 KB

README.md

File metadata and controls

70 lines (51 loc) · 1.35 KB

Color Elements

These are some highly experimental color-related web components. Use at your own risk, the API can change at any point.

All elements

{% for name, description in components -%} A screenshot showcasing the <{{ name }}> color element

{{ description | safe }}

{% endfor %}

Upcoming

{% for name in ["color-plane"] -%}

<{{ name }}>

{% endfor %}

Usage

CDN

To include all components at once:

<script src="https://elements.colorjs.io/index.js" type="module"></script>

To cherry-pick individual components, follow the instructions within the component’s page, but it generally looks like this:

<script src="https://elements.colorjs.io/src/COMPONENT_NAME/COMPONENT_NAME.js" type="module"></script>

Each component imports its own dependencies and styles.

NPM

As usual:

npm i color-elements

and then:

import "color-elements";

You can also import individual components:

import "color-elements/COMPONENT_NAME";