1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-23 12:53:44 +00:00
Files
browser/libs/tools/generator/components
bmbitwarden 481386218a PM-24189 improved screen reader parsing for special character checkbox (#17361)
* PM-24189 improved screen reader parsing for special character checkbox

* PM-24189 resolved voiceOver issue

* PM-24189 resolved voiceOver issue

* PM-27628 resolved pr comment re id and aria labels and comments

* PM-24189 resolved pr comment
2025-12-19 13:26:40 -05:00
..

Using generator components

The components within this module require the following import.

import { GeneratorModule } from "@bitwarden/generator-components";

The credential generator provides access to all generator features.

<!-- Bound to active user -->
<tools-credential-generator />

<!-- Bound to a specific user -->
<tools-credential-generator [user-id]="userId" />

<!-- receive updates when a credential is generated.
     `$event` is a `GeneratedCredential`.
-->
<tools-credential-generator (onGenerated)="eventHandler($event)" />

Specialized components are provided for username and password generation. These components support the same properties as the credential generator.

<tools-password-generator [user-id]="userId" (onGenerated)="eventHandler($event)" />
<tools-username-generator [user-id]="userId" (onGenerated)="eventHandler($event)" />

The emission behavior of onGenerated varies according to credential type. When a credential supports immediate execution, the component automatically generates a value and emits from onGenerated. An additional emission occurs each time the user changes a setting. Users may also request a regeneration.

When a credential does not support immediate execution, then onGenerated fires only when the user clicks the "generate" button.