Color input field for @schemater/core
dependent on ngx-color-picker
Usage
- Import
SchematerBootstrapColorModule
to Your project - Add
InputColorComponent
into YourSchematerCore.forRoot
configuration toinputComponents
. You can pick name as You want. Example:{name: 'color', component: InputColorComponent}
- You can add styles
@import '@schemater/bootstrap-color/colorpicker.scss
field.config
)
Available options (in -
getPresetColorsFromBootstrapVariables: boolean
- tries to fetch colors from bootstrap variables.presetColors
are ignored -
presetColors: string[]
- array of preset colors. Example:['#fff', '#000', '#2889e9', '#e920e9', '#fff500', 'rgb(236,64,64)']
-
label: string
- text to print inside colorpicker button -
defaultColor: string
- color (in hex) that will be applied if is null or undefined at init