Class IgxButtonDirective

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

Igx Module

IgxButtonModule

Igx Parent

Data Entry & Display

Igx Theme

igx-button-theme

Igx Keywords

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 type="button" igxButton="outlined">A Button</button>

Hierarchy

Hierarchy

  • IgxButtonBaseDirective
    • IgxButtonDirective

Implements

  • AfterContentInit

Constructors

Properties

buttonClick: EventEmitter<any> = ...

Emitted when the button is clicked.

buttonSelected: EventEmitter<IButtonEventArgs> = ...

Called when the button is selected.

densityChanged: EventEmitter<IDensityChangedEventArgs> = ...
disabled: boolean = false

Enables/disables the button.

Example

<button igxButton="fab" disabled></button>
element: ElementRef<any>
role: string = 'button'

Sets/gets the role attribute.

Example

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

Accessors

Methods

  • Sets the --component-size CSS variable based on the value of Display Density

    Returns "var(--ig-size, var(--ig-size-small))" | "var(--ig-size, var(--ig-size-medium))" | "var(--ig-size, var(--ig-size-large))"