ChipTagHelper
Kendo UI Chip TagHelper ChipTagHelper class.
Definition
Namespace:Kendo.Mvc.TagHelpers
Assembly:Kendo.Mvc.dll
Syntax:
[HtmlTargetElement("kendo-chip")]
public class ChipTagHelper : TagHelperBase, ITagHelper, ITagHelperComponent
Inheritance: objectTagHelperTagHelperBaseChipTagHelper
Implements:
Inherited Members
Example:
@addTagHelper *, Kendo.Mvc
<kendo-chip name="chip" avatar-class="my-avatar-class"></kendo-chip>
Child Tags
Constructors
Initializes a new instance of the ChipTagHelper class.
Properties
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.
public string AvatarClass { get; set; }
Sets a value controlling how the color is applied.
public ChipFillMode? FillMode { get; set; }
Defines custom attributes of the Chip's element.
public IDictionary<string, object> HtmlAttributes { get; set; }
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.
[HtmlAttributeName("icon")]
public string Icon { get; set; }
If set, value will be appended to the icon's element class attribute.
public string IconClass { get; set; }
The label text of the chip. Default is empty string.
public string Label { get; set; }
The name of the JavaScript function that will handle the click event. Fires when the user clicks the content of the Chip or activates it with the Enter or Space keys.
public string OnClick { get; set; }
The name of the JavaScript function that will handle the kendoKeydown event. Triggered when the user presses a keyboard key while the Chip is focused.The event handler function context (available via the this keyword) will be set to the widget instance.
public string OnKendoKeydown { get; set; }
The name of the JavaScript function that will handle the remove event. Fires when the user clicks the remove icon of the Chip. After this event, the Chip will not remove itself.
public string OnRemove { get; set; }
The name of the JavaScript function that will handle the select event. Fires when the selection of a selectable the Chip toggles.
public string OnSelect { get; set; }
Specifies if the Chip will be removable or not. If the property is set to true, the Chip renders a remove icon.
public bool? Removable { get; set; }
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.
[HtmlAttributeName("remove-icon")]
public string RemoveIcon { get; set; }
If set, value will be appended to the remove icon's element class attribute.
public string RemoveIconClass { get; set; }
Sets whether the Chip can be selected.
public bool? Selectable { get; set; }
Sets the size of the component.
public ComponentSize? Size { get; set; }
Sets the color of the component according to the applied theme.
public ChipThemeColor? ThemeColor { get; set; }
Methods
Gets the initialization script.
protected override string GetInitializationScript()
The initialization script.
Overrides:
public override Task ProcessAsync(TagHelperContext context, TagHelperOutput output)
Overrides:
Serializes the defined settings.
public override IDictionary<string, object> Serialize()
Overrides:
SerializeEvents method.
protected override Dictionary<string, object> SerializeEvents()
Overrides:
SerializeSettings method.
protected override Dictionary<string, object> SerializeSettings()
Overrides:
Writes the HTML output.
protected override void WriteHtml(TagHelperOutput output)
The TagHelper output.
Overrides: