Class ChipItem
A Chip is a small block of essential information that contains the text, image, or both and mostly used in contacts, mails, or filter tags.
Inheritance
Namespace: Syncfusion.Blazor.Buttons
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChipItem : OwningComponentBase
Constructors
ChipItem()
Declaration
public ChipItem()
Properties
ChildContent
Defines the child content for the Chip item.
Declaration
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Components.RenderFragment | The value used to build the content. |
Remarks
This can be used to render direct component tag directives as child content of Chip item.
CssClass
Specifies the custom classes to be added to the chip element used to customize the Chip.
Declaration
public string CssClass { get; set; }
Property Value
| Type |
|---|
| System.String |
Enabled
Specifies a value that indicates whether the chip component is enabled or not.
Declaration
public bool Enabled { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
HtmlAttributes
You can add the additional html attributes such as title to the each chip element.
Declaration
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
| Type |
|---|
| System.Collections.Generic.Dictionary<System.String, System.Object> |
LeadingIconCss
Specifies the leading icon CSS class for the chip.
Declaration
public string LeadingIconCss { get; set; }
Property Value
| Type |
|---|
| System.String |
LeadingIconUrl
Specifies the leading icon url for the chip.
Declaration
public string LeadingIconUrl { get; set; }
Property Value
| Type |
|---|
| System.String |
LeadingText
Specifies the customized text value for the avatar in the chip.
Declaration
public string LeadingText { get; set; }
Property Value
| Type |
|---|
| System.String |
Template
Gets or sets the template to customize the Chip item.
Declaration
public RenderFragment Template { get; set; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Components.RenderFragment | A template content that specifies the HTML content of Chip item. The default value is |
Remarks
This can be utilized to render required HTML elements such as hyperlinks, svg icons, etc.
Examples
<SfChip>
<ChipItems>
<ChipItem><a href=https://www.syncfusion.com/ target="_blank">Syncfusion</a></ChipItem>
<ChipItem><a href=https://www.google.co.in/ target="_blank">Google</a></ChipItem>
<ChipItem><a href=https://www.microsoft.com/en-in target="_blank">Microsoft</a></ChipItem>
</ChipItems>
</SfChip>
Text
Specifies the text content for the chip.
Declaration
public string Text { get; set; }
Property Value
| Type |
|---|
| System.String |
TrailingIconCss
Specifies the trailing icon CSS class for the chip.
Declaration
public string TrailingIconCss { get; set; }
Property Value
| Type |
|---|
| System.String |
TrailingIconUrl
Specifies the leading icon url for the chip.
Declaration
public string TrailingIconUrl { get; set; }
Property Value
| Type |
|---|
| System.String |
Value
This value property helps to store the chip component values.
Declaration
public string Value { get; set; }
Property Value
| Type |
|---|
| System.String |
Methods
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | ="Task". |
OnParametersSetAsync()
Method invoked when any changes in component state occurs.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task | ="Task". |