GitHub

Badge

A badge is a compact visual label or indicator used to convey status or display short pieces of information.

Components

DaffBadgeComponent

import { DaffBadgeComponent } from '@daffodil/design/badge'

DaffBadgeComponent is a compact visual label or indicator used to convey status or display short pieces of information.

@Component()
class DaffBadgeComponent {
  appearance: InputSignalWithTransform<DaffBadgeAppearance, "" | "filled" | "outlined"> = input(DaffBadgeAppearanceEnum.Filled, {
      transform: (value: DaffBadgeAppearance | '' | null | undefined) =>
        value || DaffBadgeAppearanceEnum.Filled,
    })
  @Input() color: DaffColor
  @Input() status: DaffStatus
  @Input() size: DaffButtonSize
}

Inputs

appearance
InputSignalWithTransform<DaffBadgeAppearance, "" | "filled" | "outlined">
Defaultinput(DaffBadgeAppearanceEnum.Filled, { transform: (value: DaffBadgeAppearance | '' | null | undefined) => value || DaffBadgeAppearanceEnum.Filled, })
Description

The visual style of the badge. Defaults to filled.

color
DaffColor
Default –
Description

The color of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

size
DaffButtonSize
Default –
Description

The size of the component.


Directives

DaffBadgeSizableDirective

import { DaffBadgeSizableDirective } from '@daffodil/design/badge'

@Directive()
class DaffBadgeSizableDirective extends DaffSizableDirective<DaffBadgeSize> {
  @Input() size: DaffButtonSize
}

Inputs

size
DaffButtonSize
Default –
Description

The size of the component.