- Published on
Learn How To Create A Welcome Page With Tailwind CSS from the Pros

- What is Tailwind CSS?
- The description of Welcome Page ui component
- Why use Tailwind CSS to build a Welcome Page ui component?
- The preview of Welcome Page ui component
- The source code of Welcome Page ui component
- How to build a Welcome Page with Tailwind CSS?
- Install tailwind css of verion 2.0.2
- All the unility class needed to build a Welcome Page component
- 95 steps to build a Welcome Page component with Tailwind CSS
- Conclusion
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 Welcome Page ui component
Based on google assistant welcome page.
Why use Tailwind CSS to build a Welcome Page ui component?
- It can make the building process of Welcome Page ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in Welcome Page component file.
The preview of Welcome Page ui component
Free download of the Welcome Page's source code
The source code of Welcome Page ui component
<header class="shadow bg-white index9 flex items-center justify-between flex-wrap p-6 sticky top-0"><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div class="flex items-center flex-shrink-0 text-black mr-6">
<a href="#">
<svg width='90' viewBox='0 0 177 100' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M88 32.5C88 42.165 80.165 50 70.5 50H53V32.5C53 22.835 60.835 15 70.5 15C80.165 15 88 22.835 88 32.5Z' fill='#17CF97'/><path d='M88 67.5C88 57.835 95.835 50 105.5 50H123V67.5C123 77.165 115.165 85 105.5 85C95.835 85 88 77.165 88 67.5Z' fill='#17CF97'/><path d='M53 67.5C53 77.165 60.835 85 70.5 85H88V67.5C88 57.835 80.165 50 70.5 50C60.835 50 53 57.835 53 67.5Z' fill='#17CF97'/><path d='M123 32.5C123 22.835 115.165 15 105.5 15H88V32.5C88 42.165 95.835 50 105.5 50C115.165 50 123 42.165 123 32.5Z' fill='#17CF97'/></svg>
</a></div>
<style>
html{
scroll-behavior: smooth;
}
.index9{
z-index:9999!important;
}
.logobox{
height:50px;
}
.floating {
animation-name: floating;
animation-duration: 3s;
animation-iteration-count: infinite;
animation-timing-function: ease-in-out;
margin-top: 5px;
}
@keyframes floating {
0% { transform: translate(0, 0px); }
50% { transform: translate(0, 5px); }
100% { transform: translate(0, -0px); }
}
.greyscale {
-webkit-filter: grayscale(100%); /* Safari 6.0 - 9.0 */
filter: grayscale(100%);
}
.outline-only {
-webkit-text-stroke: 0.015em black;
color:#fff;
}
.hovbtn:hover {
box-shadow: 0 0 11px rgba(33,33,33,.2);
}
</style>
</header>
<div class="sliderAx h-auto">
<div id="slider-1" class="container mx-auto" style="display: none;">
<div class="bg-cover bg-center h-auto text-white py-24 px-10 object-fill" style="background-image: url(https://www.fillmurray.com/460/300)">
<div class="md:w-1/2">
<p class="font-bold text-sm uppercase text-black ">Lorem Ipsum!</p>
<p class="text-4xl tracking-tight font-extrabold text-black sm:text-5xl md:text-6xl">ABC PaaS</p>
<p class="text-2xl mb-10 leading-none text-black ">asdfasdf</p>
<div class="mt-5 sm:mt-8 sm:flex sm:justify-center lg:justify-start">
<div class="rounded-md shadow">
<button class="opacity-50 w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-blue-500 hover:bg-blue-700 md:py-4 md:text-lg md:px-10 shadow-md" disabled="">
Diaabled
</button>
</div>
<div class="mt-3 sm:mt-0 sm:ml-3">
<a href="#" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-blue-700 bg-blue-100 hover:bg-blue-200 md:py-4 md:text-lg md:px-10 shadow">
Button
</a>
</div>
</div>
</div>
</div>
<br>
</div>
<div id="slider-2" class="container mx-auto" style="display: block;">
<div class="bg-cover bg-top h-auto text-white py-24 px-10 object-fill" style="background-image: url(https://www.fillmurray.com/460/300)">
<div class="md:w-1/2">
<p class="font-bold text-sm uppercase">Lorem Ipsum!</p>
<p class="text-4xl tracking-tight font-extrabold text-white sm:text-5xl md:text-6xl">ABC PaaS</p>
<p class="text-2xl mb-10 leading-none">asdfasdf</p>
<div class="mt-5 sm:mt-8 sm:flex sm:justify-center lg:justify-start">
<div class="rounded-md shadow">
<button class="opacity-50 w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-blue-500 hover:bg-blue-700 md:py-4 md:text-lg md:px-10 shadow-md" disabled="">
Disabled
</button>
</div>
<div class="mt-3 sm:mt-0 sm:ml-3">
<a href="#" class="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-blue-700 bg-blue-100 hover:bg-blue-200 md:py-4 md:text-lg md:px-10 shadow">
Button
</a>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
<div class="flex justify-between w-12 mx-auto pb-2">
<button id="sButton1" onclick="sliderButton1()" class="bg-blue-400 rounded-full w-4 pb-2"></button>
<button id="sButton2" onclick="sliderButton2() " class="bg-blue-400 rounded-full w-4 p-2 bg-blue-800"></button>
</div>
<section class="">
<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<link href="https://unpkg.com/pattern.css" rel="stylesheet">
</section>
<section class="" id="onemorething">
<div class="max-w-6xl mx-auto px-5 py-24 ">
<div class="text-center mb-20">
<h1 class=" title-font mb-4 text-4xl font-extrabold leading-10 tracking-tight sm:text-5xl sm:leading-none md:text-6xl">Header</h1>
<p class="text-base leading-relaxed xl:w-2/4 lg:w-3/4 mx-auto">Some Awesome text</p>
<div class="flex mt-6 justify-center">
</div>
<img src="https://via.placeholder.com/1586x739.png">
</div>
</div></section>
<section class="">
<div class="max-w-6xl mx-auto px-5 py-24 ">
<div class="text-center mb-20">
<h1 class=" title-font mb-4 text-4xl font-extrabold leading-10 tracking-tight sm:text-5xl sm:leading-none md:text-6xl">Header</h1>
<p class="text-base leading-relaxed xl:w-2/4 lg:w-3/4 mx-auto">Some Awesome text</p>
<div class="flex mt-6 justify-center">
</div>
</div>
<div class="container mx-auto p-8">
<div class="flex flex-row flex-wrap -mx-2">
<div class="w-full sm:w-1/3 h-32 md:h-48 mb-4 sm:mb-0 px-2">
<a class="block w-full h-full bg-grey-dark bg-no-repeat bg-center bg-cover" href="#" title="Link" style="background-image: url(https://via.placeholder.com/512x512.png);">
</a>
</div>
<div class="w-full sm:w-1/3 h-32 md:h-48 mb-4 sm:mb-0 px-2">
<a class="block w-full h-full bg-grey-dark bg-no-repeat bg-center bg-cover" href="#" title="Link" style="background-image: url(https://via.placeholder.com/512x512.png);">
</a>
</div>
<div class="w-full sm:w-1/3 h-32 md:h-48 mb-4 sm:mb-0 px-2">
<a class="block w-full h-full bg-grey-dark bg-no-repeat bg-center bg-cover" href="#" title="Link" style="background-image: url(https://via.placeholder.com/512x512.png);">
</a>
</div>
</div>
</div>
<div class="container mx-auto p-8">
<div class="flex flex-row flex-wrap -mx-2">
<div class="w-full sm:w-1/3 h-32 md:h-48 mb-4 sm:mb-0 px-2">
<a class="block w-full h-full bg-grey-dark bg-no-repeat bg-center bg-cover" href="#" title="Link" style="background-image: url(https://via.placeholder.com/512x512.png);">
</a>
</div>
<div class="w-full sm:w-1/3 h-32 md:h-48 mb-4 sm:mb-0 px-2">
<a class="block w-full h-full bg-grey-dark bg-no-repeat bg-center bg-cover" href="#" title="Link" style="background-image: url(https://via.placeholder.com/512x512.png);">
</a>
</div>
<div class="w-full sm:w-1/3 h-32 md:h-48 mb-4 sm:mb-0 px-2">
<a class="block w-full h-full bg-grey-dark bg-no-repeat bg-center bg-cover" href="#" title="Link" style="background-image: url(https://via.placeholder.com/512x512.png);">
</a>
</div>
</div></div>
</div></section>
<section class="">
<div class="max-w-6xl mx-auto px-5 py-24 ">
<div class="text-center mb-20">
<h1 class=" title-font mb-4 text-4xl font-extrabold leading-10 tracking-tight sm:text-5xl sm:leading-none md:text-6xl">Testimonals</h1>
<p class="text-base leading-relaxed xl:w-2/4 lg:w-3/4 mx-auto">Trusted Testimonial clients</p>
</div>
<div class="flex flex-wrap sm:-m-4 -mx-4 -mb-10 -mt-4 ">
<div class="p-10 md:w-1/3 md:mb-0 mb-6 flex flex-col ">
<div class="pattern-dots-md gray-light">
<div class="rounded bg-white p-4 transform translate-x-6 -translate-y-6 ">
<div class="w-10 h-10 inline-flex items-center justify-center rounded-full bg-green-100 text-green-500 mb-5 flex-shrink-0 p-2">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"></path></svg> </div>
<div class="flex-grow ">
<h2 class=" text-xl title-font font-medium mb-3">A</h2>
<p class="leading-relaxed text-sm text-justify"></p>
</div>
</div>
</div>
</div>
<div class="p-10 md:w-1/3 md:mb-0 mb-6 flex flex-col ">
<div class="pattern-dots-md gray-light">
<div class="rounded bg-white p-4 transform translate-x-6 -translate-y-6 ">
<div class="w-10 h-10 inline-flex items-center justify-center rounded-full bg-blue-100 text-blue-500 mb-5 flex-shrink-0">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"></path></svg>
</div>
<div class="flex-grow">
<h2 class=" text-xl title-font font-medium mb-3">B</h2>
<p class="leading-relaxed text-sm text-justify">
</p>
</div>
</div>
</div>
</div>
<div class="p-10 md:w-1/3 md:mb-0 mb-6 flex flex-col ">
<div class="pattern-dots-md gray-light">
<div class="rounded bg-white p-4 transform translate-x-6 -translate-y-6 ">
<div class="w-10 h-10 inline-flex items-center justify-center rounded-full bg-yellow-100 text-yellow-500 mb-5 flex-shrink-0">
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"></path></svg>
</div>
<div class="flex-grow">
<h2 class=" text-xl title-font font-medium mb-3">C</h2>
<p class="leading-relaxed text-sm text-justify">
</p>
</div>
</div>
</div>
</div></div></div></section>
How to build a Welcome Page with Tailwind CSS?
Install tailwind css of verion 2.0.2
Use the script
html tag to import the script of Tailwind CSS of the version 2.0.2
<script src="https://cdn.tailwindcss.com"></script>
All the unility class needed to build a Welcome Page component
bg-white
flex
flex-wrap
p-6
sticky
top-0
flex-shrink-0
text-black
mr-6
h-auto
mx-auto
bg-cover
bg-center
text-white
py-24
px-10
md:w-1/2
text-sm
text-4xl
sm:text-5xl
md:text-6xl
text-2xl
mb-10
mt-5
sm:mt-8
sm:flex
lg:justify-start
w-full
px-8
py-3
border-transparent
text-base
bg-blue-500
hover:bg-blue-700
md:py-4
md:text-lg
md:px-10
mt-3
sm:mt-0
sm:ml-3
text-blue-700
bg-blue-100
hover:bg-blue-200
bg-top
w-12
pb-2
bg-blue-400
w-4
p-2
bg-blue-800
max-w-6xl
px-5
text-center
mb-20
mb-4
xl:w-2/4
lg:w-3/4
mt-6
p-8
flex-row
-mx-2
sm:w-1/3
h-32
md:h-48
sm:mb-0
px-2
block
h-full
bg-grey-dark
bg-no-repeat
sm:-m-4
-mx-4
-mb-10
-mt-4
p-10
md:w-1/3
md:mb-0
mb-6
flex-col
p-4
w-10
h-10
inline-flex
bg-green-100
text-green-500
mb-5
w-6
h-6
flex-grow
text-xl
mb-3
text-justify
text-blue-500
bg-yellow-100
text-yellow-500
95 steps to build a Welcome Page component with Tailwind CSS
Control the background color of an element to white using the
bg-white
utilities.Use
flex
to create a block-level flex container.Use
flex
to create a block-level flex container.Control the padding on all sides of an element to 1.5rem using the
p-6
utilities.Use
sticky
to position an element asrelative
until it crosses a specified threshold, then treat it as fixed until its parent is off screen.Use the
top-0
utilities to set the top position of a positioned element to 0rem.Use
flex
to create a block-level flex container.Control the text color of an element to black using the
text-black
utilities.Control the margin on right side of an element to 1.5rem using the
mr-6
utilities.Use
h-auto
to set an element to a fixed height(auto).Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the background color of an element to cover using the
bg-cover
utilities.Control the background color of an element to center using the
bg-center
utilities.Control the text color of an element to white using the
text-white
utilities.Control the vertical padding of an element to 6rem using the
py-24
utilities.Control the horizontal padding of an element to 2.5rem using the
px-10
utilities.Use
md:w-1/2
to set an element to a fixed width(1/2) at only medium screen sizes.Control the text color of an element to sm using the
text-sm
utilities.Control the text color of an element to 4xl using the
text-4xl
utilities.Control the text color of an element to 5xl at only small screen sizes using the
sm:text-5xl
utilities.Control the text color of an element to 6xl at only medium screen sizes using the
md:text-6xl
utilities.Control the text color of an element to 2xl using the
text-2xl
utilities.Control the margin on bottom side of an element to 2.5rem using the
mb-10
utilities.Control the margin on top side of an element to 1.25rem using the
mt-5
utilities.Control the margin on top side of an element to 2rem at only small screen sizes using the
sm:mt-8
utilities.Use
flex
to create a block-level flex container at only small screen sizes.Use
justify-start
to justify items against the start of the container’s main axis at only large screen sizes.Use
w-full
to set an element to a 100% based width.Control the horizontal padding of an element to 2rem using the
px-8
utilities.Control the vertical padding of an element to 0.75rem using the
py-3
utilities.Control the border color of an element to transparent using the
border-transparent
utilities.Control the text color of an element to base using the
text-base
utilities.Control the background color of an element to blue-500 using the
bg-blue-500
utilities.Control the background color of an element to blue-700 using the
hover:bg-blue-700
utilities on hover.Control the vertical padding of an element to 1rem at only medium screen sizes using the
md:py-4
utilities.Control the text color of an element to lg at only medium screen sizes using the
md:text-lg
utilities.Control the horizontal padding of an element to 2.5rem at only medium screen sizes using the
md:px-10
utilities.Control the margin on top side of an element to 0.75rem using the
mt-3
utilities.Control the margin on top side of an element to 0rem at only small screen sizes using the
sm:mt-0
utilities.Control the margin on left side of an element to 0.75rem at only small screen sizes using the
sm:ml-3
utilities.Control the text color of an element to blue-700 using the
text-blue-700
utilities.Control the background color of an element to blue-100 using the
bg-blue-100
utilities.Control the background color of an element to blue-200 using the
hover:bg-blue-200
utilities on hover.Control the background color of an element to top using the
bg-top
utilities.Use
w-12
to set an element to a fixed width(3rem).Control the padding on bottom side of an element to 0.5rem using the
pb-2
utilities.Control the background color of an element to blue-400 using the
bg-blue-400
utilities.Use
w-4
to set an element to a fixed width(1rem).Control the padding on all sides of an element to 0.5rem using the
p-2
utilities.Control the background color of an element to blue-800 using the
bg-blue-800
utilities.Set the maximum width/height of an element using the
max-w-6xl
utilities.Control the horizontal padding of an element to 1.25rem using the
px-5
utilities.Control the text color of an element to center using the
text-center
utilities.Control the margin on bottom side of an element to 5rem using the
mb-20
utilities.Control the margin on bottom side of an element to 1rem using the
mb-4
utilities.Use
xl:w-2/4
to set an element to a fixed width(2/4) at only extremely large screen sizes.Use
lg:w-3/4
to set an element to a fixed width(3/4) at only large screen sizes.Control the margin on top side of an element to 1.5rem using the
mt-6
utilities.Control the padding on all sides of an element to 2rem using the
p-8
utilities.Use
flex
to create a block-level flex container.Control the horizontal margin of an element to -0.5rem using the
-mx-2
utilities.Use
sm:w-1/3
to set an element to a fixed width(1/3) at only small screen sizes.Use
h-32
to set an element to a fixed height(8rem).Use
md:h-48
to set an element to a fixed height(12rem) at only medium screen sizes.Control the margin on bottom side of an element to 0rem at only small screen sizes using the
sm:mb-0
utilities.Control the horizontal padding of an element to 0.5rem using the
px-2
utilities.Use
inline
utilities to put the element on its own line and fill its parent.Use
h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.Control the background color of an element to grey-dark using the
bg-grey-dark
utilities.Control the background color of an element to no-repeat using the
bg-no-repeat
utilities.Control the margin on all sides of an element to -1rem at only small screen sizes using the
sm:-m-4
utilities.Control the horizontal margin of an element to -1rem using the
-mx-4
utilities.Control the margin on bottom side of an element to -2.5rem using the
-mb-10
utilities.Control the margin on top side of an element to -1rem using the
-mt-4
utilities.Control the padding on all sides of an element to 2.5rem using the
p-10
utilities.Use
md:w-1/3
to set an element to a fixed width(1/3) at only medium screen sizes.Control the margin on bottom side of an element to 0rem at only medium screen sizes using the
md:mb-0
utilities.Control the margin on bottom side of an element to 1.5rem using the
mb-6
utilities.Use
flex
to create a block-level flex container.Control the padding on all sides of an element to 1rem using the
p-4
utilities.Use
w-10
to set an element to a fixed width(2.5rem).Use
h-10
to set an element to a fixed height(2.5rem).Use
inline-flex
to create an inline flex container that flows with text.Control the background color of an element to green-100 using the
bg-green-100
utilities.Control the text color of an element to green-500 using the
text-green-500
utilities.Control the margin on bottom side of an element to 1.25rem using the
mb-5
utilities.Use
w-6
to set an element to a fixed width(1.5rem).Use
h-6
to set an element to a fixed height(1.5rem).Use
flex
to create a block-level flex container.Control the text color of an element to xl using the
text-xl
utilities.Control the margin on bottom side of an element to 0.75rem using the
mb-3
utilities.Control the text color of an element to justify using the
text-justify
utilities.Control the text color of an element to blue-500 using the
text-blue-500
utilities.Control the background color of an element to yellow-100 using the
bg-yellow-100
utilities.Control the text color of an element to yellow-500 using the
text-yellow-500
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to build a Welcome Page components, learn and follow along to implement your own components.