New to Telerik UI for BlazorStart a free 30-day trial

A component that lets you pick a color from a predefined or custom palette arranged in tiles. Supports presets, columns and tile sizing, size variants, keyboard navigation, ARIA labeling, and two-way value binding.

Definition

Namespace:Telerik.Blazor.Components

Assembly:Telerik.Blazor.dll

Syntax:

C#
public class TelerikColorPalette : TelerikInputBase<string>, IComponent, IHandleEvent, IHandleAfterRender, IDisposable

Inheritance: objectComponentBaseBaseComponentTelerikInputBase<string>TelerikColorPalette

Implements: IComponentIDisposableIHandleAfterRenderIHandleEvent

Inherited Members TelerikInputBase<string>.SetParametersAsync(ParameterView)TelerikInputBase<string>.OnInitializedAsync()TelerikInputBase<string>.OnParametersSetAsync()TelerikInputBase<string>.Dispose()TelerikInputBase<string>.FocusAsync()TelerikInputBase<string>.CascadedEditContextTelerikInputBase<string>.FloatingLabelTelerikInputBase<string>.IdTelerikInputBase<string>.EnabledTelerikInputBase<string>.TabIndexTelerikInputBase<string>.ValueExpressionTelerikInputBase<string>.ValueChangedTelerikInputBase<string>.ValueTelerikInputBase<string>.OnChangeTelerikInputBase<string>.OnBlurTelerikInputBase<string>.AriaLabelTelerikInputBase<string>.AriaLabelledByTelerikInputBase<string>.AriaDescribedByTelerikInputBase<string>.ValidateOnTelerikInputBase<string>.InputModeBaseComponent.ShouldRender()BaseComponent.InitLocalizer()BaseComponent.ThrowIfParameterIsNull(object, string)BaseComponent.HaveOptionsChanged(IDictionary<string, object>, IDictionary<string, object>)BaseComponent.GetClassString(params string[])BaseComponent.InvokeAsync<T>(string, params object[])BaseComponent.InvokeAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidAsync(string, params object[])BaseComponent.InvokeVoidAsyncWithoutAwait(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, params object[])BaseComponent.InvokeComponentMethodAsync<T>(string, CancellationToken, params object[])BaseComponent.InvokeVoidComponentMethodAsync(string, params object[])BaseComponent.InvokeComponentVoidMethodAsync(string, object)BaseComponent.InvokeDisposeAsync()BaseComponent.StateHasChanged()BaseComponent.RootComponentBaseComponent.ClassComponentBase.OnInitialized()ComponentBase.OnAfterRender(bool)ComponentBase.InvokeAsync(Action)ComponentBase.InvokeAsync(Func<Task>)ComponentBase.DispatchExceptionAsync(Exception)...

Constructors

C#
public TelerikColorPalette()

Methods

C#
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters:__builderRenderTreeBuilder

Overrides: ComponentBase.BuildRenderTree(RenderTreeBuilder)

C#
protected override Task OnAfterRenderAsync(bool firstRender)
Parameters:firstRenderboolReturns:

Task

Overrides: BaseComponent.OnAfterRenderAsync(bool)

C#
protected override void OnParametersSet()

Overrides: ComponentBase.OnParametersSet()

Properties

The collection of colors for the user to choose from. Can be one of the built-in preset palettes - Apex, Austin, Basic, Clarity, Flow, HardCover, Metro, MonoChrome, SlipStream, Treck or Verve. Can be a custom list of colors. The default value is Office.

C#
[Parameter]
public IEnumerable<string> Colors { get; set; }

The number of columns to use when rendering the Color list. Determines the size of the component together with the TileHeight and TileWidth. Default value is 10.

C#
[Parameter]
public int Columns { get; set; }

Specifies the size of the ColorPalette.

C#
[Parameter]
public string Size { get; set; }

Defines the height of each individual color item. Determines the size of the component together with the Columns and TileWidth. Accepts CSS dimension strings. Default value is 24px.

C#
[Parameter]
public string TileHeight { get; set; }

Defines the width of each individual color item. Determines the size of the component together with the Columns and TileHeight. Accepts CSS dimension strings. Default value is 24px.

C#
[Parameter]
public string TileWidth { get; set; }