Published on

Beginners Guide: Build A SB Admin 2: Forgot Password Page With Tailwind CSS

SB Admin 2: Forgot Password Page

What is Tailwind CSS?

Tailwind CSS is a utility-first CSS framework that focuses on creating personalized user interfaces quickly. It can gives you all the building blocks you are able to create personalized designs without having to fight to override irritating opinionated styles. Also, Tailwind CSS is a highly configurable, low-level CSS framework.

The description of SB Admin 2: Forgot Password Page ui component

Sb admin 2: forgot password page built with tailwind css

Why use Tailwind CSS to create a SB Admin 2: Forgot Password Page ui component?

  • It can make the building process of SB Admin 2: Forgot Password Page ui component faster and more easily.
  • Enables building complex responsive layouts and components freely.
  • Minimum lines of CSS code in SB Admin 2: Forgot Password Page component file.

The preview of SB Admin 2: Forgot Password Page ui component

Free download of the SB Admin 2: Forgot Password Page's source code

The source code of SB Admin 2: Forgot Password Page ui component

<body class="font-mono bg-gray-400">
		<!-- Container -->
		<div class="container mx-auto">
			<div class="flex justify-center px-6 my-12">
				<!-- Row -->
				<div class="w-full xl:w-3/4 lg:w-11/12 flex">
					<!-- Col -->
					<div
						class="w-full h-auto bg-gray-400 hidden lg:block lg:w-1/2 bg-cover rounded-l-lg"
						style="background-image: url('https://source.unsplash.com/oWTW-jNGl9I/600x800')"
					></div>
					<!-- Col -->
					<div class="w-full lg:w-1/2 bg-white p-5 rounded-lg lg:rounded-l-none">
						<div class="px-8 mb-4 text-center">
							<h3 class="pt-4 mb-2 text-2xl">Forgot Your Password?</h3>
							<p class="mb-4 text-sm text-gray-700">
								We get it, stuff happens. Just enter your email address below and we'll send you a
								link to reset your password!
							</p>
						</div>
						<form class="px-8 pt-6 pb-8 mb-4 bg-white rounded">
							<div class="mb-4">
								<label class="block mb-2 text-sm font-bold text-gray-700" for="email">
									Email
								</label>
								<input
									class="w-full px-3 py-2 text-sm leading-tight text-gray-700 border rounded shadow appearance-none focus:outline-none focus:shadow-outline"
									id="email"
									type="email"
									placeholder="Enter Email Address..."
								/>
							</div>
							<div class="mb-6 text-center">
								<button
									class="w-full px-4 py-2 font-bold text-white bg-red-500 rounded-full hover:bg-red-700 focus:outline-none focus:shadow-outline"
									type="button"
								>
									Reset Password
								</button>
							</div>
							<hr class="mb-6 border-t" />
							<div class="text-center">
								<a
									class="inline-block text-sm text-blue-500 align-baseline hover:text-blue-800"
									href="./register.html"
								>
									Create an Account!
								</a>
							</div>
							<div class="text-center">
								<a
									class="inline-block text-sm text-blue-500 align-baseline hover:text-blue-800"
									href="./index.html"
								>
									Already have an account? Login!
								</a>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</body>

How to create a SB Admin 2: Forgot Password Page with Tailwind CSS?

Install tailwind css of verion 1.0.4

Use the link html tag to import the stylesheet of Tailwind CSS of the version 1.0.4

<link href=https://unpkg.com/[email protected]/dist/tailwind.min.css rel="stylesheet">

All the unility class needed to create a SB Admin 2: Forgot Password Page component

  • bg-gray-400
  • mx-auto
  • flex
  • px-6
  • my-12
  • w-full
  • xl:w-3/4
  • lg:w-11/12
  • h-auto
  • hidden
  • lg:block
  • lg:w-1/2
  • bg-cover
  • bg-white
  • p-5
  • px-8
  • mb-4
  • text-center
  • pt-4
  • mb-2
  • text-2xl
  • text-sm
  • text-gray-700
  • pt-6
  • pb-8
  • block
  • px-3
  • py-2
  • mb-6
  • px-4
  • text-white
  • bg-red-500
  • hover:bg-red-700
  • border-t
  • inline-block
  • text-blue-500
  • hover:text-blue-800

37 steps to create a SB Admin 2: Forgot Password Page component with Tailwind CSS

  1. Control the background color of an element to gray-400 using the bg-gray-400 utilities.

  2. Control the horizontal margin of an element to auto using the mx-auto utilities.

  3. Use flex to create a block-level flex container.

  4. Control the horizontal padding of an element to 1.5rem using the px-6 utilities.

  5. Control the vertical margin of an element to 3rem using the my-12 utilities.

  6. Use w-full to set an element to a 100% based width.

  7. Use xl:w-3/4 to set an element to a fixed width(3/4) at only extremely large screen sizes.

  8. Use lg:w-11/12 to set an element to a fixed width(11/12) at only large screen sizes.

  9. Use h-auto to set an element to a fixed height(auto).

  10. Use hidden to set an element to display: none and remove it from the page layout.

  11. Use inline utilities to put the element on its own line and fill its parent at only large screen sizes.

  12. Use lg:w-1/2 to set an element to a fixed width(1/2) at only large screen sizes.

  13. Control the background color of an element to cover using the bg-cover utilities.

  14. Control the background color of an element to white using the bg-white utilities.

  15. Control the padding on all sides of an element to 1.25rem using the p-5 utilities.

  16. Control the horizontal padding of an element to 2rem using the px-8 utilities.

  17. Control the margin on bottom side of an element to 1rem using the mb-4 utilities.

  18. Control the text color of an element to center using the text-center utilities.

  19. Control the padding on top side of an element to 1rem using the pt-4 utilities.

  20. Control the margin on bottom side of an element to 0.5rem using the mb-2 utilities.

  21. Control the text color of an element to 2xl using the text-2xl utilities.

  22. Control the text color of an element to sm using the text-sm utilities.

  23. Control the text color of an element to gray-700 using the text-gray-700 utilities.

  24. Control the padding on top side of an element to 1.5rem using the pt-6 utilities.

  25. Control the padding on bottom side of an element to 2rem using the pb-8 utilities.

  26. Use inline utilities to put the element on its own line and fill its parent.

  27. Control the horizontal padding of an element to 0.75rem using the px-3 utilities.

  28. Control the vertical padding of an element to 0.5rem using the py-2 utilities.

  29. Control the margin on bottom side of an element to 1.5rem using the mb-6 utilities.

  30. Control the horizontal padding of an element to 1rem using the px-4 utilities.

  31. Control the text color of an element to white using the text-white utilities.

  32. Control the background color of an element to red-500 using the bg-red-500 utilities.

  33. Control the background color of an element to red-700 using the hover:bg-red-700 utilities on hover.

  34. Control the border color of an element to t using the border-t utilities.

  35. Use inline-block utilities to wrap the element to prevent the text inside from extending beyond its parent.

  36. Control the text color of an element to blue-500 using the text-blue-500 utilities.

  37. Control the text color of an element to blue-800 on hover using the hover:text-blue-800 utilities.

Conclusion

The above is a step-by-step tutorial on how to use Tailwind CSS to create a SB Admin 2: Forgot Password Page components, learn and follow along to implement your own components.