Nondigestible Purple Mayonnaise
    Have ideas to improve npm?Join in the discussion! »

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

    0.0.4 • 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?: {
        savestring,  // Default for save button
        clearstring // Default for clear button
      },
      width?: string
    }

    默认属性

    {
      buttontrue,
      previewtrue,
      opacitytrue,
      huetrue,
     
      hextrue,
      rgbatrue,
      hslatrue,
      hsvafalse,
      inputtrue,
      cleartrue,
      savetrue,
      cmykfalse,
     
      default'#07c160',
     
      swatches[],
      inlinetrue,
     
      strings{
        save'Save',  // Default for save button
        clear'Clear' // Default for clear button
      }
    }

    Events

    • init
    • save
    • change
    • swatch-select

    Install

    npm i @omiu/color-picker

    DownloadsWeekly Downloads

    20

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    461 kB

    Total Files

    21

    Homepage

    omijs.org

    Last publish

    Collaborators

    • avatar