How to reallocate the input(color) color palette box?

Asked

Viewed 44 times

1

html, has a type of input that click opens a color palette for the user to choose a color:

<input type='color'>

Ilustração do input

I was wondering if there’s any way to edit this box that pops up, I’m mainly interested in how to reposition it. It can be using css or javascript (if possible).

  • 2

    This box is not HTML, it is your browser that shows so. In other browsers already changes everything. If you want a custom box, do not use this input, make your own.

1 answer

3


Initially, I believe that.

As seen in MDN, which I translated (elementary) below, the information is that the component is stylized and displayed by the browser, and we can not change them. Nevertheless, each browser displays according to its own interface standards.

The presentation of the element can vary substantially from one browser and/or platform to another - This can be a simple textual input that automatically validates the color information for ensure it is in proper format, or a color selector in the pattern platform, or some kind of color selector window.

If your situation requires the selector to be customized I recommend you use something already ready, for example: Spectrum, Pick-a-color,Tiny Colorpicker

Browser other questions tagged

You are not signed in. Login or sign up in order to post.