GitHub

DaffButtonComponent

class

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

DaffButtonComponent is a rectangular contained button with background color.

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

Inputs

status
DaffStatus
Default –
Description

Sets the status on a component.

Options are: info, warn, critical, and success.

color
DaffPalette
Default –
Description

Sets the color on a component.

Default options are: primary, secondary, tertiary, light, dark, theme, and theme-contrast.

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.

Examples

Basic button

<button daff-button>
 <div daffPrefix></div>
 Button
 <div daffSuffix></div>
</button>

<a href="/" daff-button>
 <div daffPrefix></div>
 Linked button
 <div daffSuffix></div>
</a>

Basic button

<button daff-button>
 <div daffPrefix></div>
 Button
 <div daffSuffix></div>
</button>

<a href="/" daff-button>
 <div daffPrefix></div>
 Linked button
 <div daffSuffix></div>
</a>