Now a days everyone is talking about Material Design. Wherever you go, people are asking you know material design? So In this post I would like to share Login Form using Material Design, Sign UP Form and Forgot password Form.
I just exited about Material Design and wanted to know more about it. After googling, I found that its an language developed by Google .
Its the future of the Web Design. Android Lollipop UI has been developed in Google’s Material Design
Contents
Why Material Design?
- Animation
- Shadows
- 3D Effects
- Motion Visualization
- Inbuilt Components
- Responsive
- CSS Transitions
- Color Palettes
- Patterns – Gesture, Touch Screen, Fingerprint & swipe to refresh etc
- More layout templates
In this tutorial, I’m going to explain you how to design a simple login and registration form / signup form using Material Design.
Material scripts comes with both the minified and unminified CSS and JavaScript files. This option requires little to no setup. Please check top material design UI frameworks in 2019
CSS
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css">
Javascript
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
Input Box Design
Text fields allow user input. The border should light up simply and clearly indicating which field the user is currently editing. You must have a .input-field div wrapping your input and label. This helps our jQuery animate the label. This is only used in our Input and Textarea form elements.
You can add an icon prefix to make the form input label even more clear. Just add an icon with the class prefixbefore the input and label. for more icons please click here
You can add custom validation messages by adding either data-error or data-success attributes to your input field labels.
<div class="row">
<form class="col s12">
<div class="row">
<div class="input-field col s12">
<i class="mdi-communication-email prefix"></i>
<input id="email" type="email" class="validate">
<label for="email" data-error="wrong" data-success="right">Email</label>
</div>
</div>
</form>
</div>
HTML Code for Login Form using Material Design
Check out my latest post on How to design a Gmail Style Login Form using Material Design & jQuery
<div id="login-page" class="row">
<div class="col s12 z-depth-6 card-panel">
<form class="login-form">
<div class="row">
<div class="input-field col s12 center">
<img src="http://w3lessons.info/logo.png" alt="" class="responsive-img valign profile-image-login">
<p class="center login-form-text">W3lessons - Material Design Login Form</p>
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="mdi-social-person-outline prefix"></i>
<input class="validate" id="email" type="email">
<label for="email" data-error="wrong" data-success="right" class="center-align">Email</label>
</div>
</div>
<div class="row margin">
<div class="input-field col s12">
<i class="mdi-action-lock-outline prefix"></i>
<input id="password" type="password">
<label for="password">Password</label>
</div>
</div>
<div class="row">
<div class="input-field col s12 m12 l12 login-text">
<input type="checkbox" id="remember-me" />
<label for="remember-me">Remember me</label>
</div>
</div>
<div class="row">
<div class="input-field col s12">
<a href="login.html" class="btn waves-effect waves-light col s12">Login</a>
</div>
</div>
<div class="row">
<div class="input-field col s6 m6 l6">
<p class="margin medium-small"><a href="register.html">Register Now!</a></p>
</div>
<div class="input-field col s6 m6 l6">
<p class="margin right-align medium-small"><a href="forgot-password.html">Forgot password?</a></p>
</div>
</div>
</form>
</div>
</div>
Background Colors
To apply a background color, just add the color name and light/darkness as a class to the element.
for more details please click here – http://materializecss.com/color.html
<body class="red">
<body class="blue">
<body class="yellow">
Login Form Demo SignUp Form Demo Forgot Password Demo
where we can download
Login & SignUp form using Material Design and jQuery script
This is awesome article, thank you. I could not figure how to remove the slight shadow underneath email field which shows up after focusing the field out. I noticed, this happens where there is a field inside card or card-panel. Any suggestion for fix? I tried this in Chrome. https://uploads.disquscdn.com/images/b5adbb63edc8eb398800736deaadb650d5c33794eb53f7d3ea740dc4d706fa5b.png
very good thanks
Well, the example is good, but it’s useless. The css is unreadable!!! Everything in one line?
Come one!
Its a minified version….
Excellent work.Can you do me a favour by including a tutorial for newsletter subscription using codeigniter.
and also after filling the form if i left any filled then if i submit the values are not in the screen Please advice
I tried the form. Without filling any data in form I cant able to see alert messages any were in the UI can you please guide me to show the alert message
Google has their own material design framework for Web, I think that will be much stable than a 3rd party framework like materialize CSS
Hi Robit,
I agree with you.. But I hope materialize css is not an ordinary framework.. its very popular and standard one..
Please check here – http://www.sitepoint.com/top-5-material-design-frameworks-use-2015/
Thanks
Its awesome. I will add this login form on my wordpress login form.