Close

Password Input Form With Animations

This is an example of a password input form with a light beam animation, designed using CSS, HTML, JavaScript, and Bootstrap framework 4. JavaScript functions have been used to implement the animation in a clicked event on the eyeball icon. The colors are predefined as --bgColor: white, --inputColor: black, --outlineColor: dodgerblue, and --beamColor: yellow. The body is given a background color as var(--bgColor), whereas the form is given a transform value as translate3d(0,0,0). The sign-in button has the styles of font-size as 1.5rem, font-family as monospace, and color as var(--inputColor), which takes an outline style of 3px solid var(--outlineColor), in a focus event. The user name and password are given a font color as black. The cursor style for the button and eyeball is set as pointer to get the hand cursor effect. The eyeball is given the size of 1.25rem, and a transform style of translateY(-50%). In a focus event on the eyeball, the background color of the form turns to black, revealing the password value and a light beam is displayed in a polygon(100% 50%, 100% 50%, 0 0, 0 100%) path, with the beam color as yellow. Source: https://codepen.io/hexagoncircle/pen/zYxzQqa

Post Comment or Questions

Lorem ut labore et dolore magna aliqua. Ut enim ad minim veniam.

Your email address will not be published. Required fields are marked *

Several Related Snippets

Lorem ut labore et dolore magna aliqua. Ut enim ad minim veniam.