Class Chip
Chip UI element.
Implements
Inherited Members
VisualElement.ExecuteDefaultAction(EventBase)
VisualElement.Focus()
VisualElement.Overlaps(Rect)
VisualElement.ToString()
VisualElement.GetFirstOfType<T>()
VisualElement.GetFirstAncestorOfType<T>()
VisualElement.canGrabFocus
VisualElement.focusController
VisualElement.cacheAsBitmap
CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
Namespace: Unity.AppUI.UI
Assembly: Unity.AppUI.dll
Syntax
public class Chip : BaseVisualElement, IEventHandler, IVisualElementScheduler, IExperimentalFeatures, ITransitionAnimations, ITransform, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IPressable
Constructors
Chip()
Default constructor.
Declaration
public Chip()
Fields
clickableUssClassName
The Chip Clickable variant styling class.
Declaration
public const string clickableUssClassName = "appui-chip--clickable"
Field Value
Type | Description |
---|---|
string |
deletableUssClassName
The Chip Deletable variant styling class.
Declaration
public const string deletableUssClassName = "appui-chip--deletable"
Field Value
Type | Description |
---|---|
string |
deleteButtonUssClassName
The Chip delete Button styling class.
Declaration
public const string deleteButtonUssClassName = "appui-chip__delete-button"
Field Value
Type | Description |
---|---|
string |
deleteIconUssClassName
The Chip delete Icon styling class.
Declaration
public const string deleteIconUssClassName = "appui-chip__delete-icon"
Field Value
Type | Description |
---|---|
string |
labelUssClassName
The Chip label styling class.
Declaration
public const string labelUssClassName = "appui-chip__label"
Field Value
Type | Description |
---|---|
string |
ornamentContainerUssClassName
The Chip ornament container styling class.
Declaration
public const string ornamentContainerUssClassName = "appui-chip__ornament-container"
Field Value
Type | Description |
---|---|
string |
ussClassName
The Chip main styling class.
Declaration
public const string ussClassName = "appui-chip"
Field Value
Type | Description |
---|---|
string |
variantUssClassName
The Chip variant styling class.
Declaration
public const string variantUssClassName = "appui-chip--"
Field Value
Type | Description |
---|---|
string |
withOrnamentUssClassName
The Chip with ornament variant styling class.
Declaration
public const string withOrnamentUssClassName = "appui-chip--with-ornament"
Field Value
Type | Description |
---|---|
string |
Properties
clickable
Clickable Manipulator for this Chip.
Declaration
public Pressable clickable { get; set; }
Property Value
Type | Description |
---|---|
Pressable |
contentContainer
The content container of the Chip. This is the ornament container.
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
deletable
Set the Chip as deletable.
Declaration
public bool deletable { get; set; }
Property Value
Type | Description |
---|---|
bool |
deleteIcon
The icon name for the delete button.
Declaration
public string deleteIcon { get; set; }
Property Value
Type | Description |
---|---|
string |
label
The Chip label.
Declaration
public string label { get; set; }
Property Value
Type | Description |
---|---|
string |
ornament
The Chip ornament.
Declaration
public VisualElement ornament { get; set; }
Property Value
Type | Description |
---|---|
VisualElement |
variant
The Chip variant.
Declaration
public Chip.Variant variant { get; set; }
Property Value
Type | Description |
---|---|
Chip.Variant |
Methods
GetVariantUssClassName(Variant)
Declaration
public static string GetVariantUssClassName(Chip.Variant enumValue)
Parameters
Type | Name | Description |
---|---|---|
Chip.Variant | enumValue |
Returns
Type | Description |
---|---|
string |
Events
clicked
Event fired when the Chip is clicked.
Declaration
public event Action clicked
Event Type
Type | Description |
---|---|
Action |
clickedWithEventInfo
Event fired when the Chip is clicked.
Declaration
public event Action<EventBase> clickedWithEventInfo
Event Type
Type | Description |
---|---|
Action<EventBase> |
deleted
Event fired when the Chip is deleted.
Declaration
public event Action deleted
Event Type
Type | Description |
---|---|
Action |
deletedWithEventInfo
Event fired when the Chip is deleted.
Declaration
public event Action<EventBase> deletedWithEventInfo
Event Type
Type | Description |
---|---|
Action<EventBase> |