ArtificialSenseDocs

Docs / Components

SenseIconButtonComponent

Icon-only action control from @artificialsenselabs/ui for toolbars, field affordances, and dismiss actions. Composes sense-icon inside a labelled native <button>.

Live demo: run nx serve showcase and open /components/icon-button (port 4202).

Overview

Category: Action / primitives. Selector: sense-icon-button. Import: import { SenseIconButtonComponent } from '@artificialsenselabs/ui';

<sense-icon-button
  icon="search"
  ariaLabel="Search"
  variant="ghost"
/>

API

Generated from libs/ui/src/lib/icon-button/sense-icon-button/sense-icon-button.component.ts โ€” run pnpm run docs:api to refresh.

Inputs
InputTypeDefaultDescription
iconSenseIconNamerequired Semantic glyph rendered inside the button.
sizeSenseIconButtonSize'md' Button scale โ€” maps to matching `sense-icon` size.
variantSenseIconButtonVariant'ghost' Surface treatment: filled, outlined, or ghost. Legacy `primary` / `secondary` accepted.
colorSenseIconButtonColor | nullnull Optional semantic colour override for the icon and hover states.
disabledbooleanfalse Disables pointer interaction and dims the control.
loadingbooleanfalse Shows spinner glyph, sets `aria-busy`, and disables interaction.
ariaLabelstringrequired Accessible name โ€” required because there is no visible label text.

Accessibility

  • APG:Button pattern โ€” icon-only buttons require ariaLabel.
  • Inner sense-icon is decorative; the native button carries the accessible name.
  • Loading swaps the label to i18n icon-button.loading and sets aria-busy="true".
  • Focus ring uses design-token outline; hover background on ghost variant.