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.
Inherited Members
Namespace: Syncfusion.Blazor.Buttons
Assembly: Syncfusion.Blazor.dll
Syntax
public class ChipItem : SfOwningComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
ChipItem()
Declaration
public ChipItem()
Properties
ChildContent
Defines the child content for the Chip item.
Declaration
[Parameter]
public RenderFragment ChildContent { get; set; }
Property Value
| Type | Description |
|---|---|
| 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
[Parameter]
public string CssClass { get; set; }
Property Value
| Type |
|---|
| string |
Enabled
Specifies a value that indicates whether the chip component is enabled or not.
Declaration
[Parameter]
public bool Enabled { get; set; }
Property Value
| Type |
|---|
| bool |
HtmlAttributes
You can add the additional html attributes such as title to the each chip element.
Declaration
[Parameter(CaptureUnmatchedValues = true)]
public Dictionary<string, object> HtmlAttributes { get; set; }
Property Value
| Type |
|---|
| Dictionary<string, object> |
LeadingIconCss
Specifies the leading icon CSS class for the chip.
Declaration
[Parameter]
public string LeadingIconCss { get; set; }
Property Value
| Type |
|---|
| string |
LeadingIconUrl
Specifies the leading icon url for the chip.
Declaration
[Parameter]
public string LeadingIconUrl { get; set; }
Property Value
| Type |
|---|
| string |
LeadingText
Specifies the customized text value for the avatar in the chip.
Declaration
[Parameter]
public string LeadingText { get; set; }
Property Value
| Type |
|---|
| string |
Template
Gets or sets the template to customize the Chip item.
Declaration
[Parameter]
public RenderFragment Template { get; set; }
Property Value
| Type | Description |
|---|---|
| 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
[Parameter]
public string Text { get; set; }
Property Value
| Type |
|---|
| string |
TrailingIconCss
Specifies the trailing icon CSS class for the chip.
Declaration
[Parameter]
public string TrailingIconCss { get; set; }
Property Value
| Type |
|---|
| string |
TrailingIconUrl
Specifies the leading icon url for the chip.
Declaration
[Parameter]
public string TrailingIconUrl { get; set; }
Property Value
| Type |
|---|
| string |
Value
This value property helps to store the chip component values.
Declaration
[Parameter]
public string Value { get; set; }
Property Value
| Type |
|---|
| string |
Methods
OnInitializedAsync()
Method invoked when the component is ready to start.
Declaration
protected override Task OnInitializedAsync()
Returns
| Type | Description |
|---|---|
| Task | ="Task". |
Overrides
OnParametersSetAsync()
Method invoked when any changes in component state occurs.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | ="Task". |