Class IgxButtonDirective

The Button directive provides the Ignite UI Button functionality to every component that's intended to be used as a button.

@igxmodule

IgxButtonModule

@igxparent

Data Entry & Display

@igxtheme

igx-button-theme

@igxkeywords

button, span, div, click

@remarks

The Ignite UI Button directive is intended to be used by any button, span or div and turn it into a fully functional button.

@example
<button igxButton="outlined">A Button</button>

Hierarchy

Implements

  • DoCheck
  • OnInit

Constructors

constructor

Properties

buttonClick

buttonClick: EventEmitter<any> = new EventEmitter<any>()

Called when the button is clicked.

element

element: ElementRef

onDensityChanged

onDensityChanged: EventEmitter<IDensityChangedEventArgs> = new EventEmitter<IDensityChangedEventArgs>()

role

role: string = "button"

Sets/gets the role attribute.

@example
this.button.role = 'navbutton';
let buttonRole = this.button.role;

selected

selected: boolean = false

Gets or sets whether the button is selected. Mainly used in the IgxButtonGroup component and it will have no effect if set separately.

@example
<button igxButton="flat" [selected]="button.selected"></button>

Accessors

background

  • set background(value: string): void

color

  • set color(value: string): void

disabled

  • set disabled(val: any): void

displayDensity

label

  • set label(value: string): void

nativeElement

  • get nativeElement(): any

type

  • set type(value: string): void

Methods

ngDoCheck

  • ngDoCheck(): void