Live demo — this example is server-driven; run the showcase locally for the interactive version.

Password generator

Composition pattern — Text input group with regenerate + copy actions. The example generates passwords client-side using crypto.getRandomValues.

Examples

Basic

16-character password from a 70-char alphabet. Click the rotate icon to regenerate, copy icon to clipboard.

Documentation

Password generator pattern

Composition only — no runtime template. The pattern is text-input-group + two utility buttons (regenerate, copy) with Alpine-driven generation logic.

Usage

Server-side for sensitive secrets. For password-reset flows, generate server-side (Java's SecureRandom) and return only the hash. Client-side generation is fine for user-facing password suggestions.