• Overview
@angular/aria/toolbar

ToolbarWidget

directive

A widget within a toolbar.

API

    
      class ToolbarWidget implements OnInit ,OnDestroy {}
    
    

element

HTMLElement

A reference to the host element.

id

InputSignal<any>

A unique identifier for the widget.

disabled

InputSignalWithTransform<boolean, unknown>

Whether the widget is disabled.

hardDisabled

Signal<any>

Whether the widget is 'hard' disabled, which is different from aria-disabled. A hard disabled widget cannot receive focus.

active

Signal<any>

Whether the widget is currently active (focused).

ngOnInit

void
@returnsvoid

ngOnDestroy

void
@returnsvoid

Description

A widget within a toolbar.

The ngToolbarWidget directive should be applied to any native HTML element that acts as an interactive widget within an ngToolbar or ngToolbarWidgetGroup. It enables keyboard navigation within the toolbar.

<button ngToolbarWidget [disabled]="isDisabled">
  Perform Action
</button>
Jump to details