# password

```ts
import { PasswordModule } from '@anguless/angulux/password';
```

## PasswordDirective

`[aglPassword]` — directive

Inherits every input, output and slot of `BaseEditableHolder` — see [baseeditableholder.md](baseeditableholder.md).

Password directive.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `pPasswordPT` | `PasswordPassThrough \| undefined` | `undefined` | Used to pass attributes to DOM elements inside the Password component. |
| `pPasswordUnstyled` | `boolean \| undefined` | `undefined` | Indicates whether the component should be rendered without styles. |
| `promptLabel` | `string` | _not documented_ | Text to prompt password entry. Defaults to AnguluxConfig I18N API configuration. |
| `weakLabel` | `string` | _not documented_ | Text for a weak password. Defaults to AnguluxConfig I18N API configuration. |
| `mediumLabel` | `string` | _not documented_ | Text for a medium password. Defaults to AnguluxConfig I18N API configuration. |
| `strongLabel` | `string` | _not documented_ | Text for a strong password. Defaults to AnguluxConfig I18N API configuration. |
| `feedback` | `boolean` | _not documented_ | Whether to show the strength indicator or not. |
| `showPassword` | `` | `false` | Sets the visibility of the password field. |
| `variant` | `'filled' \| 'outlined' \| undefined` | `'outlined'` | Specifies the input variant of the component. |
| `fluid` | `` | `false` | Spans 100% width of the container when enabled. |
| `aglSize` | `'large' \| 'small' \| undefined` | `undefined` | Specifies the size of the component. _(property `size`)_ |

## Password

`agl-password` — component

Inherits every input, output and slot of `BaseInput` — see [baseinput.md](baseinput.md).

Password displays strength indicator for password fields.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ariaLabel` | `string \| undefined` | _not documented_ | Defines a string that labels the input for accessibility. |
| `ariaLabelledBy` | `string \| undefined` | _not documented_ | Specifies one or more IDs in the DOM that labels the input field. |
| `label` | `string \| undefined` | _not documented_ | Label of the input for accessibility. |
| `promptLabel` | `string \| undefined` | _not documented_ | Text to prompt password entry. Defaults to AnguluxConfig I18N API configuration. |
| `mediumRegex` | `string` | _not documented_ | Regex value for medium regex. |
| `strongRegex` | `string` | _not documented_ | Regex value for strong regex. |
| `weakLabel` | `string \| undefined` | _not documented_ | Text for a weak password. Defaults to AnguluxConfig I18N API configuration. |
| `mediumLabel` | `string \| undefined` | _not documented_ | Text for a medium password. Defaults to AnguluxConfig I18N API configuration. |
| `maxLength` | `number \| undefined` | _not documented_ | specifies the maximum number of characters allowed in the input element. **Deprecated:** since v20.0.0, use maxlength instead. |
| `strongLabel` | `string \| undefined` | _not documented_ | Text for a strong password. Defaults to AnguluxConfig I18N API configuration. |
| `inputId` | `string \| undefined` | _not documented_ | Identifier of the accessible input element. |
| `feedback` | `boolean` | _not documented_ | Whether to show the strength indicator or not. |
| `toggleMask` | `boolean \| undefined` | _not documented_ | Whether to show an icon to display the password as plain text.  The icon is a toggle button in the tab order, named by the `aria.showPassword` translation ("Show password" without one), with `aria-pressed` set while the password shows. Enter or Space toggles it, as a click does, and focus stays on it. |
| `inputStyleClass` | `string \| undefined` | _not documented_ | Style class of the input field. |
| `styleClass` | `string \| undefined` | _not documented_ | Style class of the element. **Deprecated:** since v20.0.0, use `class` instead. |
| `inputStyle` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | Inline style of the input field. |
| `showTransitionOptions` | `string` | _not documented_ | Transition options of the show animation. **Deprecated:** since v21.0.0, use `motionOptions` instead. |
| `hideTransitionOptions` | `string` | _not documented_ | Transition options of the hide animation. **Deprecated:** since v21.0.0, use `motionOptions` instead. |
| `autocomplete` | `string \| undefined` | _not documented_ | Specify automated assistance in filling out password by browser. |
| `placeholder` | `string \| undefined` | _not documented_ | Advisory information to display on input. |
| `showClear` | `boolean` | _not documented_ | When enabled, a clear icon is displayed to clear the value. |
| `autofocus` | `boolean \| undefined` | _not documented_ | When present, it specifies that the component should automatically get focus on load. |
| `tabindex` | `number` | _not documented_ | Index of the element in tabbing order. |
| `appendTo` | `HTMLElement \| ElementRef \| TemplateRef<any> \| 'self' \| 'body' \| null \| undefined \| any` | `'self'` | Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
| `motionOptions` | `MotionOptions \| undefined` | _not documented_ | The motion options. |
| `overlayOptions` | `OverlayOptions \| undefined` | _not documented_ | Whether to use overlay API feature. The properties of overlay API can be used like an object in it. |

| Output | Type | Description |
| --- | --- | --- |
| `onFocus` | `EventEmitter<Event>` | Callback to invoke when the component receives focus. |
| `onBlur` | `EventEmitter<Event>` | Callback to invoke when the component loses focus. |
| `onClear` | `EventEmitter<any>` | Callback to invoke when clear button is clicked. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #content>` | `contentTemplate` | Custom template of content. |
| `<ng-template #footer>` | `footerTemplate` | Custom template of footer. |
| `<ng-template #header>` | `headerTemplate` | Custom template of header. |
| `<ng-template #clearicon>` | `clearIconTemplate` | Custom template of clear icon. |
| `<ng-template #hideicon>` | `hideIconTemplate` | Custom template of hide icon. |
| `<ng-template #showicon>` | `showIconTemplate` | Custom template of show icon. |
