ArtificialSenseDocs

Docs / Components

SensePasswordComponent

Password input from @artificialsenselabs/ui with visibility toggle, optional clear action, and forms CVA support.

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

Overview

Category: Form control. Selector: sense-password. Import: import { SensePasswordComponent } from '@artificialsenselabs/ui';

<sense-password ariaLabel="Password" [(ngModel)]="password" />

Pair with a visible <label for="..."> or set ariaLabel. Use passwordVisibilityChange for visibility analytics โ€” not passwordVisibleChange from the model binding alone.

Inputs & outputs

APITypeDefaultDescription
ariaLabelstring | nullnullAccessible name when no visible label is associated.
toggleMaskbooleantrueShow the show/hide password toggle button.
showClearbooleantrueShow clear button when the field has a value.
passwordVisiblebooleanfalseTwo-way model for plain-text visibility state.
passwordVisibilityChangebooleanโ€”Emitted when the user toggles visibility.
clearedvoidโ€”Emitted when the user clears the field.

Accessibility

  • Pattern:ARIA password input with labelled native <input type="password">.
  • Toggle uses aria-pressed and i18n show/hide labels; icons are decorative.
  • Clear and toggle buttons use tabindex="-1" so keyboard users stay in the input.