GitHub

Button

Buttons make actions apparent to users and can navigate to different pages or perform actions. They can display text, icons, or both.

Components

DaffButtonComponent

import { DaffButtonComponent } from '@daffodil/design/button'

DaffButtonComponent is a rectangular contained button with background color.

@Component()
class DaffButtonComponent extends DaffButtonBaseDirective {
  @Input() elevated: boolean = false
  @Input() tabindex: number = 0
  @Input() disabled: any
  @Input() size: DaffButtonSize
  @Input() status: DaffStatus
  @Input() color: DaffPalette
}

Inputs

elevated
boolean
Defaultfalse
Description

Whether or not the button displays a shadow.

tabindex
number
Default0
Description

Sets the tabindex.

disabled
any
Default –
Description

The disabled state of the button.

size
DaffButtonSize
Default –
Description

The size of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

color
DaffPalette
Default –
Description

Sets the color on a component.


DaffFlatButtonComponent

import { DaffFlatButtonComponent } from '@daffodil/design/button'

DaffFlatButtonComponent is a rectangular contained button no background.

@Component()
class DaffFlatButtonComponent extends DaffButtonBaseDirective {
  @Input() tabindex: number = 0
  @Input() disabled: any
  @Input() size: DaffButtonSize
  @Input() status: DaffStatus
  @Input() color: DaffPalette
}

Inputs

tabindex
number
Default0
Description

Sets the tabindex.

disabled
any
Default –
Description

The disabled state of the button.

size
DaffButtonSize
Default –
Description

The size of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

color
DaffPalette
Default –
Description

Sets the color on a component.


DaffRaisedButtonComponent

Deprecated

import { DaffRaisedButtonComponent } from '@daffodil/design/button'

@Component()
class DaffRaisedButtonComponent extends DaffButtonBaseDirective {
  @Input() tabindex: number = 0
  @Input() disabled: any
  @Input() size: DaffButtonSize
  @Input() status: DaffStatus
  @Input() color: DaffPalette
}

Inputs

tabindex
number
Default0
Description

Sets the tabindex.

disabled
any
Default –
Description

The disabled state of the button.

size
DaffButtonSize
Default –
Description

The size of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

color
DaffPalette
Default –
Description

Sets the color on a component.


DaffStrokedButtonComponent

import { DaffStrokedButtonComponent } from '@daffodil/design/button'

DaffStrokedButtonComponent is a rectangular outlined button with no background color.

@Component()
class DaffStrokedButtonComponent extends DaffButtonBaseDirective {
  @Input() elevated: boolean = false
  @Input() tabindex: number = 0
  @Input() disabled: any
  @Input() size: DaffButtonSize
  @Input() status: DaffStatus
  @Input() color: DaffPalette
}

Inputs

elevated
boolean
Defaultfalse
Description

Whether or not the button displays a shadow.

tabindex
number
Default0
Description

Sets the tabindex.

disabled
any
Default –
Description

The disabled state of the button.

size
DaffButtonSize
Default –
Description

The size of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

color
DaffPalette
Default –
Description

Sets the color on a component.


DaffUnderlineButtonComponent

import { DaffUnderlineButtonComponent } from '@daffodil/design/button'

DaffUnderlineButtonComponent is a borderless button with a custom underline style.

@Component()
class DaffUnderlineButtonComponent extends DaffButtonBaseDirective {
  @Input() tabindex: number = 0
  @Input() disabled: any
  @Input() size: DaffButtonSize
  @Input() status: DaffStatus
  @Input() color: DaffPalette
}

Inputs

tabindex
number
Default0
Description

Sets the tabindex.

disabled
any
Default –
Description

The disabled state of the button.

size
DaffButtonSize
Default –
Description

The size of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

color
DaffPalette
Default –
Description

Sets the color on a component.


DaffIconButtonComponent

import { DaffIconButtonComponent } from '@daffodil/design/button'

DaffIconButtonComponent is an icon button used with icon fonts.

@Component()
class DaffIconButtonComponent extends DaffButtonBaseDirective {
  @Input() tabindex: number = 0
  @Input() disabled: any
  @Input() size: DaffButtonSize
  @Input() status: DaffStatus
  @Input() color: DaffPalette
}

Inputs

tabindex
number
Default0
Description

Sets the tabindex.

disabled
any
Default –
Description

The disabled state of the button.

size
DaffButtonSize
Default –
Description

The size of the component.

status
DaffStatus
Default –
Description

Sets the status on a component.

color
DaffPalette
Default –
Description

Sets the color on a component.


Directives

DaffButtonSizableDirective

import { DaffButtonSizableDirective } from '@daffodil/design/button'

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

Inputs

size
DaffButtonSize
Default –
Description

The size of the component.


Modules

DaffButtonModule

Deprecated

import { DaffButtonModule } from '@daffodil/design/button'

@NgModule()
class DaffButtonModule {}

Types

DaffButtonSize

import { DaffButtonSize } from '@daffodil/design/button'

The size types that the DaffButtonComponent can implement.