Table of Contents

Class MudChipSet<T>

Namespace
MudBlazor
Assembly
MudBlazor.dll

Represents a set of multiple MudChip<T> components.

[CascadingTypeParameter("T")]
public class MudChipSet<T> : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged, IDisposable

Type Parameters

T

The type of item managed by this component.

Inheritance
MudChipSet<T>
Implements
Inherited Members
Extension Methods

Constructors

MudChipSet()

public MudChipSet()

Properties

AllClosable

Allows all chips in this set to be closed.

[Parameter]
[Category("Behavior")]
public bool AllClosable { get; set; }

Property Value

bool

Remarks

Defaults to false.

CheckMark

Shows checkmarks for selected chips.

[Parameter]
[Category("Appearance")]
public bool CheckMark { get; set; }

Property Value

bool

CheckedIcon

The default icon shown for selected chips in this set.

[Parameter]
[Category("Appearance")]
public string CheckedIcon { get; set; }

Property Value

string

Remarks

Defaults to Check. Can be overridden by setting CheckedIcon.

ChildContent

The content within this chipset.

[Parameter]
[Category("Behavior")]
public RenderFragment? ChildContent { get; set; }

Property Value

RenderFragment

Classname

protected string Classname { get; }

Property Value

string

CloseIcon

The default close icon shown for closeable chips in this set.

[Parameter]
[Category("Appearance")]
public string CloseIcon { get; set; }

Property Value

string

Remarks

Defaults to Cancel. Can be overridden by setting CloseIcon.

Color

The default color for all chips in this set.

[Parameter]
[Category("Appearance")]
public Color Color { get; set; }

Property Value

Color

Remarks

Defaults to Default. Can be overridden by setting Color.

Comparer

The comparer used to determine when a selection has changed.

[Parameter]
[Category("Behavior")]
public IEqualityComparer<T?> Comparer { get; set; }

Property Value

IEqualityComparer<T>

Remarks

Defaults to Default.

Disabled

Prevents the user from interacting with chips in this set.

[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }

Property Value

bool

Remarks

Defaults to false. When true, the all chips are visibly disabled and interaction is not allowed. Overrides any value set for Disabled.

IconColor

The default icon color for all chips in this set.

[Parameter]
[Category("Appearance")]
public Color IconColor { get; set; }

Property Value

Color

Remarks

Defaults to Inherit. Can be overridden by setting IconColor.

Label

Uses the theme border radius for chips in this set.

[Parameter]
[Category("Appearance")]
public bool Label { get; set; }

Property Value

bool

Remarks

Defaults to false. When true, the DefaultBorderRadius is used for chip edges. Can be overridden by setting Label.

OnClose

Occurs when any chip has been closed.

[Parameter]
public EventCallback<MudChip<T>> OnClose { get; set; }

Property Value

EventCallback<MudChip<T>>

ReadOnly

Prevents chips in this set from being clicked.

[Parameter]
[Category("Behavior")]
public bool ReadOnly { get; set; }

Property Value

bool

Remarks

Defaults to false. When true, chips cannot be clicked even if OnClick is set.

Ripple

Shows a ripple effect when a chip is clicked.

[Parameter]
[Category("Appearance")]
public bool Ripple { get; set; }

Property Value

bool

Remarks

Defaults to true. Can be overridden by setting Ripple.

SelectedColor

The default color for all selected chips in this set.

[Parameter]
[Category("Appearance")]
public Color SelectedColor { get; set; }

Property Value

Color

Remarks

Defaults to Inherit. Can be overridden by setting SelectedColor.

SelectedValue

The currently selected value.

[Parameter]
[Category("Behavior")]
public T? SelectedValue { get; set; }

Property Value

T

Remarks

This property is used when SelectionMode is SingleSelection or ToggleSelection.

SelectedValueChanged

Occurs when SelectedValue has changed.

[Parameter]
public EventCallback<T?> SelectedValueChanged { get; set; }

Property Value

EventCallback<T>

Remarks

This property is used when SelectionMode is SingleSelection or ToggleSelection.

SelectedValues

The currently selected chips in this set.

[Parameter]
[Category("Behavior")]
public IReadOnlyCollection<T>? SelectedValues { get; set; }

Property Value

IReadOnlyCollection<T>

Remarks

This event occurs when SelectionMode is MultiSelection.

SelectedValuesChanged

Occurs when SelectedValues has changed.

[Parameter]
public EventCallback<IReadOnlyCollection<T>?> SelectedValuesChanged { get; set; }

Property Value

EventCallback<IReadOnlyCollection<T>>

Remarks

This event occurs when SelectionMode is MultiSelection.

SelectionMode

The mode controlling how many selections are allowed.

[Parameter]
[Category("Behavior")]
public SelectionMode SelectionMode { get; set; }

Property Value

SelectionMode

Remarks

Defaults to SingleSelection. Other values include MultiSelection and ToggleSelection.

Size

The default size for all chips in this set.

[Parameter]
[Category("Appearance")]
public Size Size { get; set; }

Property Value

Size

Remarks

Defaults to Medium. Can be overridden by setting Size.

Variant

The default variant for all chips in this set.

[Parameter]
[Category("Appearance")]
public Variant Variant { get; set; }

Property Value

Variant

Remarks

Defaults to Filled. Can be overridden by setting Variant.

Methods

BuildRenderTree(RenderTreeBuilder)

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

Dispose()

Releases unused resources.

public void Dispose()

See Also

MudChip<T>