Random Password Generator In Vanilla JavaScript
20/09/2020
🔑Table of Contents
Intro
This is a little project I've been wanting to do for a while. To create a simple password generator that is similar in functionality to something you'd see in the likes of LastPass or 1Password, that can be quickly used to create secure passwords. A snapshot can be seen in the below image. Click the live site link below to see it in action.
Functionality
Being a very simple version of something you'd find on password storing apps, the functionality I was aiming for is:
- Optional checkboxes for:
- Uppercase letters
- Lowercase letters
- Symbols
- Numbers
- Ability to specify how many characters the password
- Error validation in the form of a simple toast when:
- No checkboxes are selected when the user clicks the 'Generate' button. It should also default to one which is lowercase in this case)
- Nothing to copy. When user clicks 'copy to clipboard' button and no checkboxes are selected, toast message should show.
Live Site
GitHub Repo
- Next: Train Times App Using Create React App
- Previous: React In Eleventy Example