Angular: Build A Custom Password Field

Hide Password With dots

Allen Kim
Digital-Heart
2 min readJul 7, 2020

--

Saying you need a password field but you must not save password, and you also want to avoid all browser default behaviour regarding password field. e.g. Agent application.

What if you can hide user input with dots?

There are ways to do it, but each one has it’s own downside

  • Use -webkit-text-security property, but only works with Chrome Browser
  • Make your own like this, but too much coding and maintenance.
  • Use custom font which hiding input, but build a font?

Answer to this question is to use a pre-built custom font, which is called text-surity.

Here are the steps how to use this node module.

  1. Install
  2. Update styles.css
  3. Use it

1. Install

2. Update styles.css

This will install following fonts

  • text-security-disc
  • text-security-circle
  • text-seciuryt-square

3. Use it

Happy Coding :)

This article is a part of Angular Random How-Tos. You may find some useful articles for your daily development.

Do you think this useful? If so please;
*
Clap 👏 button below️ to let others to see this too.
* Follow Allen on Twitter (@allenhwkim)

--

--