Last active
December 24, 2024 14:35
-
-
Save tarikguney/83cdae881f74b1addce8f3236f503379 to your computer and use it in GitHub Desktop.
Login Form Design in Angular Material
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.login-form-flex { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
height: 100%; | |
} | |
.button-flex-container { | |
display: flex; | |
width: 100%; | |
justify-content: flex-end; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="login-form-flex"> | |
<mat-card> | |
<mat-card-title> | |
Login | |
</mat-card-title> | |
<mat-card-content> | |
<mat-form-field> | |
<input matInput placeholder="User Name"> | |
</mat-form-field> | |
<br/> | |
<mat-form-field> | |
<input type="password" matInput placeholder="Password"/> | |
</mat-form-field> | |
</mat-card-content> | |
<mat-card-actions> | |
<div class="button-flex-container"> | |
<button mat-raised-button color="primary">Login</button> | |
</div> | |
</mat-card-actions> | |
</mat-card> | |
</div> |
Very useful thanks a lot!
thank you!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The CSS uses FlexBox properties to align content. The login form is centered in the screen both horizontally and vertically.
The following shows how the login looks like in a browser: