### File

`packages/components/eui-badge/eui-badge.component.ts`

### Description

A badge component that can display text, numbers, or icons with various states and styles. Supports content truncation, empty states, and icon-only modes.

### Implements

`AfterViewInit`

### Metadata

changeDetection | `ChangeDetectionStrategy.OnPush`
HostDirectives | `BaseStatesDirective` Inputs : euiPrimary euiSecondary euiSuccess euiInfo euiWarning euiDanger euiAccent euiVariant euiSizeS euiSizeM euiSizeVariant euiOutline
selector | `div[euiBadge], span[euiBadge], eui-badge`
imports | `ObserversModule`
templateUrl | `./eui-badge.component.html`
styleUrl | `./eui-badge.scss`

### Index

###### Properties
content role
###### Methods
onContentChanged
###### Inputs
aria-label charReplacement e2eAttr euiDottedBadge euiIconBadge maxCharCount
###### HostBindings
attr.role class
###### Accessors
cssClasses

### Inputs

aria-label
Type : `string | null`
Default value : `'badge'`

charReplacement
Type : `string`

e2eAttr
Type : `string`
Default value : `'eui-badge'`

euiDottedBadge
Type : `boolean`
Default value : `false`

euiIconBadge
Type : `boolean`
Default value : `false`

maxCharCount
Type : `number`

### HostBindings

attr.role
Type : `string`
Default value : `'status'`

class
Type : `string`

### Methods

onContentChanged
`onContentChanged()`
Handles content changes and triggers content checking Returns : `void`

### Properties

content
Type : `ElementRef`
Decorators : `@ViewChild('contentRef')`

role
Type : `string`
Default value : `'status'`
Decorators : `@HostBinding('attr.role')`

### Accessors

cssClasses
get `cssClasses()`
Computes and returns the CSS classes for the badge based on its current state Returns : `string`

# results matching ""

# No results matching ""