ColorPicker

in namespace DotVVM.Bootstrap5.Controls

Usage & Scenarios

Renders a Bootstrap color picker.

https://getbootstrap.com/docs/5.0/forms/form-control/#color

Sample 1: Basic Usage in Form

The Color property can be used with data binding.

<bs:TextBox Text="{value: Color}" />

<bs:ColorPicker Title="Color picker" Color="{value: Color}" />
public class ViewModel : DotvvmViewModelBase
{
    public string Color { get; set; } = "#ff4444";
}

Properties

Name Type Description Notes Default Value
property icon Color String Gets or sets the color picker value.
attribute
inner element
static value
bindable
default
null
property icon Content List<DotvvmControl> Gets or sets the content placed inside the control.
attribute
inner element
static value
bindable
default
null
property icon Enabled Boolean Gets or sets whether the color picker is enabled.
attribute
inner element
static value
bindable
default
True
property icon RenderLabel Boolean Gets or sets whether the label will be rendered. If set to null than the label will be rendered if needed.
attribute
inner element
static value
bindable
default
False
property icon Size Size Gets or sets the size of the color picker.
attribute
inner element
static value
bindable
default
null
property icon Text String Gets or sets the text inside the control.
attribute
inner element
static value
bindable
default
null
property icon Title String Gets or sets the title attribute of the color picker.
attribute
inner element
static value
bindable
default
null
property icon Visible Boolean Gets or sets whether the control is visible. When set to false, `style="display: none"` will be added to this control.
attribute
inner element
static value
bindable
default
True

HTML produced by the control