Fireship · @fireship

Animated CSS Login Form w/ Password Validation Meter

Uploaded May 18, 2020 · Length 14:37

Animated CSS Login Form w/ Password Validation Meter

Summary

Create an animated login form with HTML and CSS, including password validation meter and animation effects.

  • animated login form
  • css animation
  • password validation
  • html form
  • css pseudo elements

Transcript preview

The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.

  1. 0:01

    HTML forms are usually very boring but

  2. 0:04

    there's no reason that they can't be one

  3. 0:05

    of the most creative aspects of your UI

  4. 0:07

    and you don't even need a library like

  5. 0:08

    material design to make that happen in

  6. 0:10

    today's video we'll build an animated

  7. 0:12

    login form from scratch with HTML and

  8. 0:14

    CSS notice how it moves the label up

  9. 0:16

    when an input field is focused and also

  10. 0:19

    slides in a border underneath but when

  11. 0:21

    it comes to the password we'll throw in

  12. 0:22

    some JavaScript with spell to take

  13. 0:24

    things to another level we'll write a

  14. 0:25

    simple algorithm to analyze the password

  15. 0:27

    strength then show the end user a

  16. 0:29

    strength meter along with validation

  17. 0:31

    errors based on the content of their

  18. 0:33

    password in order to make all this

  19. 0:34

    happen from scratch they learned about

  20. 0:36

    CSS transforms and transition animations

  21. 0:38

    pseudo elements like after box shadows

  22. 0:41

    and gradients and even a little bit of

  23. 0:42

    red X if you're new here like and

  24. 0:44

    subscribe and if you like the format of

  25. 0:46

    this video make sure to let me know what

  26. 0:47

    you want to see next in the comments

  27. 0:49

    let's start by taking a closer look at

  28. 0:51

    what we're building today what we have

  29. 0:52

    here is just a regular HTML form input

  30. 0:54

    along with a label when the user focuses

  31. 0:56

    in on a form input we translate the

  32. 0:58

    label up along the y-axis and scale it

  33. 1:01

    down a little bit this behavior was made

  34. 1:02

    famous by material design but you can

  35. 1:04

    easily implement it on your own with

  36. 1:06

    just a few lines of CSS when the input

  37. 1:08

    is focused we also animate in a border

  38. 1:10

    from the left side but it's not handled

  39. 1:12

    with a border it actually uses a CSS

  40. 1:14

    pseudo element which we'll talk about

  41. 1:15

    later

  42. 1:16

    now our password field is really over

  43. 1:18

    the top when the user starts typing it

  44. 1:19

    animates this password meter based on

  45. 1:21

    the strength of the password I'll show

  46. 1:23

    you how to use a box shadow to create

  47. 1:24

    this shudder like effect for each bar in

  48. 1:26

    the meter in addition we'll also

  49. 1:28

    validate different patterns in the

  50. 1:30

    password string to show the user

  51. 1:32

    specific validation errors and finally

  52. 1:34

    we'll add a little button in the form

  53. 1:35

    input so the user can see their password

  54. 1:37

    text this tutorial is designed for you

  55. 1:40

    to follow along step by step and you can

  56. 1:41

    find the project's source code on github

  57. 1:43

    well mostly be talking about HTML and

  58. 1:45

    CSS but we'll use felt to you manage our

  59. 1:47

    JavaScript and application state and if

  60. 1:50

    you've never used smelt before don't

  61. 1:51

    worry you're gonna love it it's super

  62. 1:53

    intuitive and easy to learn to get

  63. 1:54

    things started we'll head over to spelt

  64. 1:56

    dev you'll see a command here that you

  65. 1:58

    can run with NP X to create a new small