diff --git a/src/framework/theme/components/button/button.component.ts b/src/framework/theme/components/button/button.component.ts index ccb5226a11..8a524fd193 100644 --- a/src/framework/theme/components/button/button.component.ts +++ b/src/framework/theme/components/button/button.component.ts @@ -560,6 +560,11 @@ export class NbButtonComponent implements AfterViewInit { */ @Input() appearance: NbButtonAppearance = 'filled'; + /** + * Tabindex of the button. + */ + @Input() tabIndex: number; + /** * Sets `filled` appearance */ @@ -653,7 +658,15 @@ export class NbButtonComponent implements AfterViewInit { // issue #794 @HostBinding('attr.tabindex') get tabbable(): string { - return this.disabled ? '-1' : '0'; + if (this.disabled) { + return '-1'; + } + + if (this.tabIndex == null) { + return '0'; + } + + return this.tabIndex.toString(); } @HostBinding('class.size-tiny')