@omiu/color-picker
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

ColorPicker

Color Picker

Import

import '@omiu/color-picker'

Or use script tag to ref it.

<script src="https://unpkg.com/@omiu/color-picker"></script>

Usage

<o-color-picker></o-color-picker>

API

Props

{
  button?: boolean,
  preview?: boolean,
  opacity?: boolean,
  hue?: boolean,

  hex?: boolean,
  rgba?: boolean,
  hsla?: boolean,
  hsva?: boolean,
  input?: boolean,
  clear?: boolean,
  save?: boolean,
  cmyk?: boolean,

  default?: string,

  swatches?: string[],

  inline?: boolean,
  strings?: {
    save: string,  // Default for save button
    clear: string // Default for clear button
  },
  width?: string
}

默认属性

{
  button: true,
  preview: true,
  opacity: true,
  hue: true,

  hex: true,
  rgba: true,
  hsla: true,
  hsva: false,
  input: true,
  clear: true,
  save: true,
  cmyk: false,

  default: '#07c160',

  swatches: [],
  inline: true,

  strings: {
    save: 'Save',  // Default for save button
    clear: 'Clear' // Default for clear button
  }
}

Events

  • init
  • save
  • change
  • swatch-select

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.6
    2
    • latest

Version History

Package Sidebar

Install

npm i @omiu/color-picker

Weekly Downloads

2

Version

0.0.6

License

MIT

Unpacked Size

87.3 kB

Total Files

7

Last publish

Collaborators

  • dntzhang