@spectrum-web-components/color-handle
TypeScript icon, indicating that this package has built-in type declarations

0.48.0 • Public • Published

Description

The <sp-color-handle> is used to select a colour on an <sp-color-area>, <sp-color-slider>, or <sp-color-wheel>. It functions similarly to the handle on an <sp-slider>.

Usage

See it on NPM! How big is this package in your project? Try it on webcomponents.dev

yarn add @spectrum-web-components/color-handle

Import the side effectful registration of <sp-color-handle> via:

import '@spectrum-web-components/color-handle/sp-color-handle.js';

When looking to leverage the ColorHandle base class as a type and/or for extension purposes, do so via:

import { ColorHandle } from '@spectrum-web-components/color-handle';

Standard

<sp-color-handle></sp-color-handle>

Disabled

<sp-color-handle disabled></sp-color-handle>

Open

When the <sp-color-handle> uses the open property, the <sp-color-loupe> component can be used above the handle to show the selected color that would otherwise be covered by a mouse, stylus, or finger on the down/touch state. This can be customized to appear only on finger-input, or always appear regardless of input type.

<div style="height: 72px"></div>
<sp-color-handle open></sp-color-handle>

/@spectrum-web-components/color-handle/

    Package Sidebar

    Install

    npm i @spectrum-web-components/color-handle

    Weekly Downloads

    2,601

    Version

    0.48.0

    License

    Apache-2.0

    Unpacked Size

    90.9 kB

    Total Files

    40

    Last publish

    Collaborators

    • rubenc
    • pvashish
    • nikkimk
    • jnjosh
    • taratadobe
    • rajrock38
    • beeduul
    • jianliao79
    • hunterloftis
    • westbrook
    • benjamind
    • cuberoot