Color Picker

The QColor component provides a method to input colors.

TIP

For handling colors, also check out Quasar Color Utils.

Installation

/*
 * No installation step is necessary.
 * It gets installed by default by @quasar/app v2+.
 */

Usage

Basic

Basic

With QInput

Input

There are helpers for QInput rules prop: full list. You can use these for convenience or write the string specifying your custom needs.

Examples: “hexColor”, “rgbOrRgbaColor”, “anyColor”.

More info: QInput.

You can choose if you don’t want to render the header and/or footer, like in example below:

No header/footer

Custom default view

You can also pick the default view, like in example below, where we also specify we don’t want to render the header and footer. The end result generates a nice color palette that the user can pick from:

Custom default view

Custom palette

Custom palette

Dark mode

Dark version

Default value

Default value

Lazy update

Lazy model

Disable and readonly

Disable and readonly

Native form submit

When dealing with a native form which has an action and a method (eg. when using Quasar with ASP.NET controllers), you need to specify the name property on QColor, otherwise formData will not contain it (if it should):

Native form

QColor API

Loading API...
Please wait...