Skip to content

InputDefault Palette Config Module

A validation focused palette of a variety of color class types for use with form input elements via properties/values with the keys of default, error, and success.

app.vv.ts Use

You'll usually work with the InputDefault Palette Config Module after it's already been merged into VueVentus VvConfig data.

Here's what that generally looks like in practice in a real world app context:

javascript
// ./src/app.vv.ts

import { VvConfig } from '@obewds/vueventus'
import type { ConfigVv, DefaultPaletteColors } from '@obewds/vueventus'

let appVv: ConfigVv = VvConfig


// ...


// Override the default VvConfig inputs palette colors individually
appVv.inputs.palettes.default.default = '...'
appVv.inputs.palettes.default.error = '...'
appVv.inputs.palettes.default.secondary = '...'

// Bring your overrides to the VvConfig textareas palettes default object
appVv.textareas.palettes.default = appVv.inputs.palettes.default


// Add a new custom app anchor color name & value
// to the default VvConfig inputs palette
appVv.inputs.palettes.default.newAppColor = '...'

// Bring your overrides to the VvConfig textareas palettes
appVv.textareas.palettes.default.newAppColor = appVv.inputs.palettes.default.newAppColor


// Add a new custom app anchor palette
appVv.inputs.palettes.myCustomAppPalette = {
    default: '...',
    error: '...',
    success: '...',
    // Add a new custom app anchor color name & value
    anotherAppColor: '...',
} as DefaultPaletteColors

// Bring your overrides to the VvConfig textareas palettes default object
appVv.textareas.palettes.myCustomAppPalette = appVv.inputs.palettes.myCustomAppPalette


// ...


export default appVv

Import

However, if you need to import the compiled library version of the InputDefault Palette Config Module, you can use:

javascript
import { InputDefault } from '@obewds/vueventus'

Module Code

ts
// ./src/configs/palettes/InputDefault.ts

import type { DefaultValidationPaletteColors } from '../../types/DefaultValidationPaletteColors'

export default <DefaultValidationPaletteColors> {
    'default': 'focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-400 dark:focus:border-blue-400 border-gray-300 dark:border-gray-600 bg-gray-50 focus:bg-white dark:bg-gray-800 dark:focus:bg-gray-700 placeholder:text-gray-400 placeholder:dark:text-gray-300 selection:bg-blue-600 dark:selection:bg-blue-500 selection:text-white',
    error: 'text-rose-700 dark:text-rose-200 focus:ring-rose-500 focus:border-rose-500 dark:focus:ring-rose-400 dark:focus:border-rose-400 border-rose-300 dark:border-rose-600 bg-rose-100 focus:bg-rose-50 dark:bg-rose-800 dark:focus:bg-rose-700 placeholder:text-rose-400 placeholder:dark:text-rose-300 selection:bg-rose-600 dark:selection:bg-rose-500 selection:text-white',
    success: 'text-green-700 dark:text-green-200 focus:ring-green-500 focus:border-green-500 dark:focus:ring-green-400 dark:focus:border-green-400 border-green-300 dark:border-green-600 bg-green-100 focus:bg-green-50 dark:bg-green-800 dark:focus:bg-green-700 placeholder:text-green-600 placeholder:dark:text-green-400 selection:bg-green-600 dark:selection:bg-green-500 selection:text-white',
}

Released under the MIT License