This component has dependencies. Read the below section for more information.
Dependency
This component depends on Pickr. Be sure to include it on your page.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pickr-widget/dist/pickr.min.css"/>
<script src="https://cdn.jsdelivr.net/npm/pickr-widget/dist/pickr.min.js"></script>
Basic #
This is the most basic usage of RegateColor
.
Regate.RegateColor.init({
id: 'basic-example',
name: 'Color',
})
@Html.Raw(RegateColor.Build("Color"))
Value #
Regate.RegateColor.init({
id: 'value-example',
name: 'Color',
value: '#ff6600'
})
@Html.Raw(RegateColor.Build("Color", "#ff6600"))
Required #
Regate.RegateColor.init({
id: 'required-example',
name: 'Color',
isRequired: true,
})
@Html.Raw(RegateColor.Build("Color", isRequired: true))