TelerikColorPicker
A component that lets you choose a color using a popup with Gradient and Palette views. Supports value preview/template, icons, open/close events, adaptive rendering (popup/action sheet), theming (fill/rounded/size), and two-way value binding.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikColorPicker : ColorEditorBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>ColorEditorBaseTelerikColorPicker...
Implements:
Inherited Members
Constructors
public TelerikColorPicker()
Properties
Defines if the component will adapt and automatically change its rendering based on the current screen size. Default value is None.
[Parameter]
public AdaptiveMode AdaptiveMode { get; set; }
Provides configuration for WebMCP tools, such as a Name to distinguish this ColorPicker from others on the same page.
[Parameter]
public RenderFragment ColorPickerSettings { get; set; }
The ColorPicker popup can display different views. They allow users to select a color from an interface that matches their preferences. The supported views are: Telerik.Blazor.Components.ColorGradient and Telerik.Blazor.Components.ColorPalette. By default, both views are enabled and the gradient view is displayed first. Children: Telerik.Blazor.Components.ColorGradient, Telerik.Blazor.Components.ColorPalette.
[Parameter]
public RenderFragment ColorPickerViews { get; set; }
Gets or sets the description used for the data-smart-paste attribute.
[Parameter]
public string DataSmartPasteDescriptionAttribute { get; set; }
Enables WebMCP tool registration for this ColorPicker.
When true, ColorPicker operations are exposed as tools discoverable by AI models through the browser.
Default value is false.
[Parameter]
public bool EnableWebMcpTools { get; set; }
Specifies the fill mode of the ColorPicker.
[Parameter]
public string FillMode { get; set; }
Specifies the icon rendered in the picker value. You can use either a predefined Telerik Icon or a custom one. Refer to Icons - Documentation for more information on how icons work.
[Parameter]
public object Icon { get; set; }
Defines the OnClose Event which is fired before the popup of the ColorPicker is closed.
[Parameter]
public EventCallback<ColorPickerCloseEventArgs> OnClose { get; set; }
Defines the OnOpen Event which is fired before the popup of the ColorPicker is opened.
[Parameter]
public EventCallback<ColorPickerOpenEventArgs> OnOpen { get; set; }
Specifies a popup class to be rendered on the popup.
[Parameter]
public string PopupClass { get; set; }
Specifies the roundness of the ColorPicker.
[Parameter]
public string Rounded { get; set; }
Specifies a title attribute to be rendered on the chooser button.
[Parameter]
public string Title { get; set; }
Defines the RenderFragment to be displayed in the chooser button instead of the default colored square. Children: allows arbitrary content.
[Parameter]
public RenderFragment ValueTemplate { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
Closes the popup of the component.
public void Close()
Opens the popup of the component.
public void Open()