|
| 1 | +--- |
| 2 | +meta: |
| 3 | + nav: Color inputs |
| 4 | + title: Color input component |
| 5 | + description: The color input is a specialized input that provides a clean interface for selecting colors. |
| 6 | + keywords: color input, color picker, color field |
| 7 | +related: |
| 8 | + - /components/color-pickers/ |
| 9 | + - /components/text-fields/ |
| 10 | + - /components/menus/ |
| 11 | +features: |
| 12 | + label: 'C: VColorInput' |
| 13 | + report: true |
| 14 | + github: /labs/VColorInput/ |
| 15 | +--- |
| 16 | + |
| 17 | +# Color inputs |
| 18 | + |
| 19 | +The `v-color-input` component combines a text field with a color picker.. |
| 20 | + |
| 21 | +<PageFeatures /> |
| 22 | + |
| 23 | +::: warning |
| 24 | + |
| 25 | +This feature requires [v3.6.0](/getting-started/release-notes/?version=v3.6.0) |
| 26 | + |
| 27 | +::: |
| 28 | + |
| 29 | +## Installation |
| 30 | + |
| 31 | +Labs components require a manual import and installation of the component. |
| 32 | + |
| 33 | +```js { resource="src/plugins/vuetify.js" } |
| 34 | +import { VColorInput } from 'vuetify/labs/VColorInput' |
| 35 | + |
| 36 | +export default createVuetify({ |
| 37 | + components: { |
| 38 | + VColorInput, |
| 39 | + }, |
| 40 | +}) |
| 41 | +``` |
| 42 | + |
| 43 | +## Usage |
| 44 | + |
| 45 | +At its core, the `v-color-input` component is a basic container that extends [v-text-field](/components/text-fields). |
| 46 | + |
| 47 | +<ExamplesUsage name="v-color-input" /> |
| 48 | + |
| 49 | +<PromotedEntry /> |
| 50 | + |
| 51 | +## API |
| 52 | + |
| 53 | +| Component | Description | |
| 54 | +| - | - | |
| 55 | +| [v-color-input](/api/v-color-input/) | Primary component | |
| 56 | +| [v-color-picker](/api/v-color-picker/) | Color picker component | |
| 57 | +| [v-text-field](/api/v-text-field/) | Text field component | |
| 58 | + |
| 59 | +<ApiInline hide-links /> |
| 60 | + |
| 61 | +## Guide |
| 62 | + |
| 63 | +The `v-color-input` component provides a clean interface for selecting colors. |
| 64 | + |
| 65 | +### Props |
| 66 | + |
| 67 | +The `v-color-input` component extends the [v-text-field](/components/text-fields/) and [v-color-picker](/components/color-pickers/) component; and supports all of their props. |
| 68 | + |
| 69 | +#### Pip icon |
| 70 | + |
| 71 | +You can move the pip icon within the input or entirely by utilizing the **prepend-icon** and **prepend-inner-icon** properties. |
| 72 | + |
| 73 | +<ExamplesExample file="v-color-input/prop-prepend-icon" /> |
| 74 | + |
| 75 | +#### Color Pip |
| 76 | + |
| 77 | +The `color-pip` is a boolean that determines whether the pip icon color matches the selected color. |
| 78 | + |
| 79 | +<ExamplesExample file="v-color-input/prop-color-pip" /> |
0 commit comments