Button for Angular
Introduction
Section titled “Introduction”Triggers an action. Enhances a native <button>, keeping native semantics, form behavior, and keyboard activation.
- Five variantsPrimary, secondary, outline, ghost, and danger emphasis in three sizes.
- Icons either sideAn icon at the start or end, or an icon-only button with an accessible name.
- Loading stateA busy button shows a spinner, blocks activation, and announces that it is loading.
- Toggle buttonsSet pressed to make a toggle that reports its new state on every press.
- Enhance or createUpgrade an existing button or link, or create a new button in code.
Behavior, design tokens, and limitations are described on the Button page; this page covers the Angular API.
Live example
Section titled “Live example”import { Component, signal } from '@angular/core';import { AuiButton } from '@absoluteui/angular/button';
@Component({ selector: 'app-save-bar', imports: [AuiButton], template: ` <button type="button" auiButton variant="secondary" (click)="cancel()">Cancel</button> <button type="button" auiButton variant="primary" [loading]="saving()" (click)="save()">Save changes</button>`,})export class SaveBarComponent { readonly saving = signal(false); cancel(): void {} save(): void { this.saving.set(true); }}Install and start
Section titled “Install and start”npm install @absoluteui/angular @absoluteui/components @absoluteui/core @absoluteui/themeSetup with provideAbsoluteUI() is covered in Getting started. Styles are included with the component.
import { AuiButton, AuiLinkButton } from '@absoluteui/angular/button';Defaults for every instance: provideAbsoluteUIConfig({ components: { button: { ... } } }) (see Configuration).
API reference
Section titled “API reference”button[auiButton]
Section titled “button[auiButton]”Class AuiButton; template reference #ref="auiButton".
AbsoluteUI Button: <button auiButton variant="primary">Save</button>. Variants primary, secondary, outline, ghost, danger; sizes sm, md, lg; loading; icon + iconPosition or a projected icon component; fullWidth. Disabled is the native attribute. Enhances the native button in place (native type, form, and disabled keep working); its content, including projected icon components, stays Angular-managed.
Server rendering: Renders in the browser only; on the server the element stays empty.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
variant |
ButtonVariant |
'secondary' |
Visual emphasis. |
size |
ButtonSize |
'md' |
Control height and font size. |
loading |
boolean |
false |
Busy state: aria-disabled, activation blocked, spinner shown, ‘Loading’ added to the accessible name. |
icon |
IconRef | null |
null |
Icon name or definition. |
iconPosition |
"start" | "end" |
'start' |
Icon placement (logical). |
fullWidth |
boolean |
false |
Stretch to the full inline size of the container. |
label |
string |
Accessible name for icon-only buttons. | |
icons |
Partial<ButtonIcons> |
Icon slot overrides. |
Two-way bindings
Section titled “Two-way bindings”| Model | Type | Change output | Description |
|---|---|---|---|
[(pressed)] |
boolean | null |
(pressedChange) |
Toggle button: bind [(pressed)]; unset is an ordinary button. |
Test harness
Section titled “Test harness”AuiButtonHarness from @absoluteui/angular/testing. button[auiButton] and a[auiButton].
a[auiButton]
Section titled “a[auiButton]”Class AuiLinkButton; template reference #ref="auiButton".
A link styled as a button: <a auiButton href="/help">Help</a> or, with the router, <a auiButton routerLink="/reports">Reports</a> (import RouterLink from @angular/router). The element stays a link: href, target, rel, download, modified clicks (new tab), routerLinkActive, query params, and fragments keep working natively. disabled sets aria-disabled, removes the link from the tab order, and blocks activation (including RouterLink navigation) while keeping the href; loading blocks activation too.
Server rendering: Renders in the browser only; on the server the element stays empty.
Inputs
Section titled “Inputs”| Input | Type | Default | Description |
|---|---|---|---|
variant |
ButtonVariant |
'secondary' |
Visual emphasis. |
size |
ButtonSize |
'md' |
Control height and font size. |
loading |
boolean |
false |
Busy state: aria-disabled, activation blocked, spinner shown, ‘Loading’ added to the accessible name. |
disabled |
boolean |
Links have no native disabled: aria-disabled, out of the tab order, activation blocked. |
|
icon |
IconRef | null |
null |
Icon name or definition. |
iconPosition |
"start" | "end" |
'start' |
Icon placement (logical). |
fullWidth |
boolean |
false |
Stretch to the full inline size of the container. |
label |
string |
Accessible name for icon-only links. | |
icons |
Partial<ButtonIcons> |
Icon slot overrides. |
Accessibility and performance
Section titled “Accessibility and performance”Pattern: WAI-ARIA APG Button pattern, implemented with a native <button>.
The Angular component renders the framework-neutral component, so its keyboard support, roles, WCAG 2.2 criteria, budgets, and import cost apply unchanged: see Button: Accessibility and performance.
(c) 2026 Kasadara Technology Solutions Pvt Ltd. AbsoluteUI is free to use under the AbsoluteUI Free Use License; it is not open source.