Angular 11Bootstrap 4

Angular 11 Sign In Form Designs

Angular 11 Sign In Form Designs

Hello friends, welcome back to my blog. Today in this blog post, I am going to tell you, Angular 11 Sign In Form Designs.

Angular 11 Sign In Form Designs
Angular Sign In Form Designs

Angular 11 came and if you are new then you must check below two links:

  1. Angular11 Basic Tutorials

Friends now I proceed onwards and here is the working code snippet for Angular 11 Sign In Form Designs and please use carefully this to avoid the mistakes:

1. Firstly friends we need fresh angular 11 setup and for this we need to run below commands but if you already have angular 11 setup then you can avoid below commands. Secondly we should also have latest node version installed on our system:

npm install -g @angular/cli 

ng new angularbootstrap //Create new Angular Project

cd angularbootstrap // Go inside the Angular Project Folder

ng serve --open // Run and Open the Angular Project

http://localhost:4200/ // Working Angular Project Url

 

2. Now friends, here we need to run below commands into our project terminal to install bootstrap and jquery modules into our angular application:

npm install --save bootstrap

 

3. Now friends, here we need to add below  into our angular.json file:

...
 "styles": [
              ...
              "node_modules/bootstrap/dist/css/bootstrap.min.css"
...

 

4. Now friends we just need to add below code into src/app/app.component.html file to get final out on the web browser:

<div class="container">
    <div class="row m-4">
        <div class="col-4">
            <div class="login-card-purple p-3 shadow-lg rounded">
                <div class="pt-3">
                    <h2 class="text-white ">Sign In | Purple</h2>
                </div>

                <form class="mt-5"> 
                    <div class="form-group">
                        <input type="email" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Email Id">
                    </div>

                    <div class="form-group">
                        <input type="password" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Password">
                    </div>

                    <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="rememberCheckBox">
                        <label class="form-check-label text-light" for="rememberCheckBox">Remember me?</label>
                    </div>

                    <div class="mt-5">
                        <button class="btn btn-sm btn-light col">
                            Login
                        </button>
                    </div>

                    <div class="text-center mt-2">
                        <a href="#" class="text-warning">Forgot Password?</a>
                    </div>
                    
                    <div class="mt-5">
                        <p class="text-white text-center">
                            Don't have an account?
                            <a href="#" class="text-warning">Click here to register</a>
                        </p>
                    </div>
                </form>
            </div>
        </div>

        <div class="col-4">
            <div class="login-card-light p-3 shadow-lg rounded">
                <div class="pt-3">
                    <h2 class="text-danger">Sign In | Light</h2>
                </div>

                <form class="mt-5">
                    <div class="form-group">
                        <input type="email" 
                            class="form-control form-control-sm" 
                            placeholder="Email Id">
                    </div>

                    <div class="form-group">
                        <input type="password" 
                            class="form-control form-control-sm" 
                            placeholder="Password">
                    </div>

                    <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="rememberCheckBox">
                        <label class="form-check-label text-dark" for="rememberCheckBox">Remember me?</label>
                    </div>

                    <div class="mt-5">
                        <button class="btn btn-sm btn-danger col">
                            Login
                        </button>
                    </div>

                    <div class="text-center mt-2">
                        <a href="#">Forgot Password?</a>
                    </div>
                    
                    <div class="mt-5">
                        <p class="text-center">
                            Don't have an account?
                            <a href="#">Click here to register</a>
                        </p>
                    </div>
                </form>
            </div>
        </div>

        <div class="col-4">
            <div class="login-dark p-3 shadow-lg rounded">
                <div class="pt-3">
                    <h2 class="text-white ">Sign In | Dark</h2>
                </div>

                <form class="mt-5">
                    <div class="form-group">
                        <input type="email" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Email Id">
                    </div>

                    <div class="form-group">
                        <input type="password" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Password">
                    </div>

                    <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="rememberCheckBox">
                        <label class="form-check-label text-light" for="rememberCheckBox">Remember me?</label>
                    </div>

                    <div class="mt-5">
                        <button class="btn btn-sm btn-light col">
                            Login
                        </button>
                    </div>

                    <div class="text-center mt-2">
                        <a href="#" class="text-warning">Forgot Password?</a>
                    </div>
                    
                    <div class="mt-5">
                        <p class="text-white text-center">
                            Don't have an account?
                            <a href="#" class="text-warning">Click here to register</a>
                        </p>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="row m-4">
        <div class="col-4">
            <div class="login-blue p-3 shadow-lg rounded">
                <div class="pt-3">
                    <h2 class="text-white ">Sign In | Blue</h2>
                </div>

                <form class="mt-5">
                    <div class="form-group">
                        <input type="email" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Email Id">
                    </div>

                    <div class="form-group">
                        <input type="password" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Password">
                    </div>

                    <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="rememberCheckBox">
                        <label class="form-check-label text-light" for="rememberCheckBox">Remember me?</label>
                    </div>

                    <div class="mt-5">
                        <button class="btn btn-sm btn-light col">
                            Login
                        </button>
                    </div>

                    <div class="text-center mt-2">
                        <a href="#" class="text-warning">Forgot Password?</a>
                    </div>
                    
                    <div class="mt-5">
                        <p class="text-white text-center">
                            Don't have an account?
                            <a href="#" class="text-warning">Click here to register</a>
                        </p>
                    </div>
                </form>
            </div>
        </div>

        <div class="col-4">
            <div class="login-card-yellow p-3 shadow-lg rounded">
                <div class="pt-3">
                    <h2 class="text-dark">Sign In | Yellow</h2>
                </div>

                <form class="mt-5">
                    <div class="form-group">
                        <input type="email" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Email Id">
                    </div>

                    <div class="form-group">
                        <input type="password" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Password">
                    </div>

                    <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="rememberCheckBox">
                        <label class="form-check-label text-dark" for="rememberCheckBox">Remember me?</label>
                    </div>

                    <div class="mt-5">
                        <button class="btn btn-sm btn-light col">
                            Login
                        </button>
                    </div>

                    <div class="text-center mt-2">
                        <a href="#">Forgot Password?</a>
                    </div>
                    
                    <div class="mt-5">
                        <p class="text-center">
                            Don't have an account?
                            <a href="#">Click here to register</a>
                        </p>
                    </div>
                </form>
            </div>
        </div>

        <div class="col-4">
            <div class="login-purple-pink p-3 shadow-lg rounded">
                <div class="pt-3">
                    <h2 class="text-white ">Sign In | Purple-Pink</h2>
                </div>

                <form class="mt-5">
                    <div class="form-group">
                        <input type="email" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Email Id">
                    </div>

                    <div class="form-group">
                        <input type="password" 
                            class="form-control form-control-sm bg-light" 
                            placeholder="Password">
                    </div>

                    <div class="form-group form-check">
                        <input type="checkbox" class="form-check-input" id="rememberCheckBox">
                        <label class="form-check-label text-light" for="rememberCheckBox">Remember me?</label>
                    </div>

                    <div class="mt-5">
                        <button class="btn btn-sm btn-light col">
                            Login
                        </button>
                    </div>

                    <div class="text-center mt-2">
                        <a href="#" class="text-warning">Forgot Password?</a>
                    </div>
                    
                    <div class="mt-5">
                        <p class="text-white text-center">
                            Don't have an account?
                            <a href="#" class="text-warning">Click here to register</a>
                        </p>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

 

5. Now friends we just need to css code code into src/app/app.component.css file:

.login-card-purple {
    background: linear-gradient(145deg, #673AB7, #9C27B0);
}

.login-card-yellow {
    background: linear-gradient(145deg, #FFC107, #FFEB3B);
}

.login-card-light {
    background: linear-gradient(145deg, #eee, #fff);
}

.login-dark {
    background: linear-gradient(145deg, #575b5d, #252b2d);
}

.login-blue {
    background: linear-gradient(145deg, #2196F3, #3F51B5);
}

.login-purple-pink {
    background: linear-gradient(145deg, #3F51B5, #E91E63);
}

body {
    font-size: 13px;
}
h2.text-white, h2.text-danger
{
    font-size: 28px;
}

 

Friends in the end must run ng serve command into your terminal to run the angular 11 project.

Now we are done friends. If you have any kind of query, suggestion and new requirement then feel free to comment below.

Note: Friends, In this post, I just tell the basic setup and things, you can change the code according to your requirements.

I will appreciate that if you will tell your views for this post. Nothing matters if your views will be good or bad because with your views, I will make my next posts more good and helpful.

Jassa

Thanks

Ajay Malhotra
the authorAjay Malhotra
Hello to all. Welcome to therichpost.com. Myself Ajay Malhotra and I am freelance full stack developer. I love coding. I know Wordpress, Core php, Angularjs, Angular 2, Angular 6, Angular 7, Angular 8, Angular 9, Angular 10, Angular 11, Nodejs, laravel, Codeigniter, Shopify, Squarespace, Jquery, Google Map Api, Vuejs, Reactjs, Bigcommerce etc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.