New to Telerik UI for ASP.NET Core? Start a free 30-day trial

Defines the fluent API for configuring the Kendo UI Chip

Definition

Constructors

Initializes a new instance of the ChipBuilder class.

C#
public ChipBuilder(Chip component)
Parameters:componentChip

Methods

If set, value will be appended to the icon's element class attribute. It also appends "k-chip avatar" and "k-avatar" classes to the icon's element.

C#
public ChipBuilder AvatarClass(string value)
Parameters:valuestring

The value for AvatarClass

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Toggles the enabled state of the Chip.

C#
public ChipBuilder Enabled(bool value)
Parameters:valuebool

The value for Enabled

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Configures the client-side events.

C#
public ChipBuilder Events(Action<ChipEventBuilder> configurator)
Parameters:configuratorAction<ChipEventBuilder>

The client events action.

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Example:
C#
@(Html.Kendo().Chip()
.Name("Chip")
.Events(events =&gt; events
.Click("onClick")
)
)

Sets a value controlling how the color is applied.

C#
public ChipBuilder FillMode(ChipFillMode value)
Parameters:valueChipFillMode

The value for FillMode

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Defines custom attributes of the Chip's element.

C#
public override ChipBuilder HtmlAttributes(IDictionary<string, object> attributes)
Parameters:attributesIDictionary<string, object>

The value for HtmlAttributes

Returns:

ChipBuilder

Returns the current instance of ChipBuilder for method chaining.

Overrides: WidgetBuilderBase<Chip, ChipBuilder>.HtmlAttributes(IDictionary<string, object>)

Example:
C#
@(Html.Kendo().Chip()
.Name("chip")
.HtmlAttributes(new Dictionary&lt;string, object&gt;() { {"class", "foo"} })
)

Defines custom attributes of the Chip's element.

C#
public override ChipBuilder HtmlAttributes(object attributes)
Parameters:attributesobject

The value for HtmlAttributes

Returns:

ChipBuilder

Returns the current instance of ChipBuilder for method chaining.

Overrides: WidgetBuilderBase<Chip, ChipBuilder>.HtmlAttributes(object)

Example:
C#
@(Html.Kendo().Chip()
.Name("chip")
.HtmlAttributes(new { @class = "foo" })
)

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the chip by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
public ChipBuilder Icon(Action<ChipIconSettingsBuilder> configurator)
Parameters:configuratorAction<ChipIconSettingsBuilder>

The ChipIconSettingsBuilder for the icon setting.

Returns:

ChipBuilder

Returns the current instance of ChipBuilder .

Defines the name for an existing icon in a Kendo UI theme or SVG content. The icon is rendered inside the chip by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
public ChipBuilder Icon(string icon)
Parameters:iconstring

The icon.

Returns:

ChipBuilder

Returns the current instance of ChipBuilder .

If set, value will be appended to the icon's element class attribute.

C#
public ChipBuilder IconClass(string value)
Parameters:valuestring

The value for IconClass

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

The label text of the chip. Default is empty string.

C#
public ChipBuilder Label(string value)
Parameters:valuestring

The value for Label

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Specifies if the Chip will be removable or not. If the property is set to true, the Chip renders a remove icon.

C#
public ChipBuilder Removable()
Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Specifies if the Chip will be removable or not. If the property is set to true, the Chip renders a remove icon.

C#
public ChipBuilder Removable(bool value)
Parameters:valuebool

The value for Removable

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Defines the name for an existing icon in a Kendo UI theme or SVG content for the remove button when removable=true. The icon is rendered inside the chip by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
public ChipBuilder RemoveIcon(Action<ChipRemoveIconSettingsBuilder> configurator)
Parameters:configuratorAction<ChipRemoveIconSettingsBuilder>

The ChipRemoveIconSettingsBuilder for the removeicon setting.

Returns:

ChipBuilder

Returns the current instance of ChipBuilder .

Defines the name for an existing icon in a Kendo UI theme or SVG content for the remove button when removable=true. The icon is rendered inside the chip by a span.k-icon or span.k-svg-icon element.See web font icons help article for more details on Kendo UI icons.Set this option to an icon descriptor such as { name: "gear", variant: "outline" }. The variant can be outline, solid, or duotone; it applies to SVG rendering and is ignored for font icons.

C#
public ChipBuilder RemoveIcon(string removeIcon)
Parameters:removeIconstring

The removeicon.

Returns:

ChipBuilder

Returns the current instance of ChipBuilder .

If set, value will be appended to the remove icon's element class attribute.

C#
public ChipBuilder RemoveIconClass(string value)
Parameters:valuestring

The value for RemoveIconClass

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Sets a value controlling the border radius.

C#
public ChipBuilder Rounded(Rounded value)
Parameters:valueRounded

The value for Rounded

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Sets whether the Chip can be selected.

C#
public ChipBuilder Selectable()
Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Sets whether the Chip can be selected.

C#
public ChipBuilder Selectable(bool value)
Parameters:valuebool

The value for Selectable

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Toggles the selected state of the Chip.

C#
public ChipBuilder Selected()
Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Toggles the selected state of the Chip.

C#
public ChipBuilder Selected(bool value)
Parameters:valuebool

The value for Selected

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Sets the size of the component.

C#
public ChipBuilder Size(ComponentSize value)
Parameters:valueComponentSize

The value for Size

Returns:

ChipBuilder

Returns the current ChipBuilder instance.

Sets the color of the component according to the applied theme.

C#
public ChipBuilder ThemeColor(ChipThemeColor value)
Parameters:valueChipThemeColor

The value for ThemeColor

Returns:

ChipBuilder

Returns the current ChipBuilder instance.