mdbassit / Coloris

A lightweight and elegant JavaScript color picker. Written in vanilla ES6, no dependencies. Accessible.
https://coloris.js.org/examples.html
MIT License
470 stars 58 forks source link

Inline mode with setInstance #67

Closed AntonLitvin closed 1 year ago

AntonLitvin commented 1 year ago

Hi! I tried to set inline mode through setInstance, but it still popup. maybe i do something wrong?

<div class="form-input color-picker color-picker-inline ">
  <label for="cp2">Choose color</label>
  <input id="cp2" type="text" class="instance1" data-coloris>
</div>

Coloris.setInstance('.instance1', {
  parent: '.color-picker-inline',
  theme: 'polaroid',
  inline: true
});
mdbassit commented 1 year ago

Instances are not supported in inline mode, and similarly, you can not set inline mode using instances. If you need an inline color picker, use the main configuration method.

AntonLitvin commented 1 year ago

two items: inline (set default) and not inline (set through instance) does not work togeather(( And no way to set multiply inline color-pickers?

mdbassit commented 1 year ago

There is no way to have multiple inline color pickers.

AntonLitvin commented 1 year ago

Thanks, have a good day