---
id: Password generator
section: patterns
---

import { useEffect, useRef, useState } from 'react';
import RedoIcon from '@patternfly/react-icons/dist/esm/icons/redo-icon';
import RhUiViewFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-view-fill-icon';
import RhUiViewOffFillIcon from '@patternfly/react-icons/dist/esm/icons/rh-ui-view-off-fill-icon';

## Demos

### Provide a generated password

```ts file="./examples/PasswordGenerator.tsx"
```
