### File

`packages/ecl/components/ecl-tag/ecl-tag.component.ts`

### Extends

`ECLBaseDirective`

### Implements

`OnDestroy`

### Metadata

selector | `ecl-tag, [eclTag]`
imports | `EUI_ECL_ICON` `TitleCasePipe`
templateUrl | `./ecl-tag.component.html`

### Index

###### Properties
isVisible title
###### Methods
onRemoveClick getCssClasses
###### Inputs
isWrapped variant class e2eAttr tabindex
###### Outputs
remove
###### HostBindings
class style.display
###### Accessors
isHidden cssClasses isRemovable

### Constructor

`constructor(el: ElementRef)`
Parameters :
Name | Type | Optional
el | `ElementRef` | No

### Inputs

isWrapped
Type : `boolean`
Default value : `true`
Whether the tag content should be allowed to wrap onto multiple lines. Set to false to force single-line display (adds `ecl-tag--nowrap` class). Defaults to true.

variant
Defines the variant of the tag. Currently only 'removable' is supported.

class
Type : `string`

e2eAttr
Type : `any`

tabindex
Type : `number`

### Outputs

remove
Type : `EventEmitter`
Event emitted when the tag is removed. Can be prevented by calling `preventDefault()` on the emitted event.

### HostBindings

class
Type : `string`

style.display
Type : `string | null`

### Methods

onRemoveClick
`onRemoveClick()`
Called when the tag’s remove button is clicked (or enter key pressed). Emits the `remove` event. If not prevented, the tag is hidden. Returns : `void`

getCssClasses
`getCssClasses(rootClass: string)`
Parameters :
Name | Type | Optional
rootClass | `string` | No
Returns : `string`

### Properties

isVisible
Default value : `true`

title
Type : `string`
Default value : `'dismiss'`

### Accessors

isHidden
get `isHidden()`

cssClasses
get `cssClasses()`

isRemovable
get `isRemovable()`
Whether the tag is removable (based on the `variant` input). Returns : `boolean`

# results matching ""

# No results matching ""