NG Kit

Delete Button

The Delete Button triggers destructive actions, styled with a danger colour and a delete (trash) icon. It extends the Base Button and surfaces a “Deleting…” loading label.

Usage

Use the button through its directive selector on any element, or through its component selector. The directive form is preferred for new code; the component form remains supported.

html
<!-- Directive (preferred) -->
<button ariaLabel="Delete item" (click)="onDelete()" deleteButton mat-raised-button>Delete</button>

<!-- Component -->
<delete-button ariaLabel="Delete item" (click)="onDelete()"></delete-button>

API

A destructive delete button, extending the base button. All other base inputs and outputs are inherited.

Inputs

NameTypeDefaultDescription
labelstring'Delete'Button label text.
iconstring'delete'Material icon name rendered before the label.
loadingLabelstring'Deleting...'Text shown while loading is true.
classesstring'delete-button'CSS classes applied to the button.