error
Description
Optional. Defines whether error styling is applied to a color selectUsage
disabled?: boolean;
Parameters
true- error styling is appliedfalse- (default) error styling is not applied
Example
<ColorSelect error={true}/>
Details
The property is useful during a form validation. If the property is set to true the color select gets error styling: the input's border and the color's value become red.
To add a red error label for the control, use the error property of the Field control:
<script>
import { ColorSelect, Field } from "@svar-ui/svelte-core";
</script>
<Field label="Error message" error={true}>
<ColorSelect error={true}/>
</Field>
Related article: Styling a color validation error
Related sample: ColorSelect