- Published on
What You Need To Make A WeTransfer style layout With Tailwind CSS

- What is Tailwind CSS?
- The description of WeTransfer style layout ui component
- Why use Tailwind CSS to create a WeTransfer style layout ui component?
- The preview of WeTransfer style layout ui component
- The source code of WeTransfer style layout ui component
- How to create a WeTransfer style layout with Tailwind CSS?
- Install tailwind css of verion 2.0.2
- All the unility class needed to create a WeTransfer style layout component
- 44 steps to create a WeTransfer style layout 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 WeTransfer style layout ui component
Download modal with a random background from unsplash
Why use Tailwind CSS to create a WeTransfer style layout ui component?
- It can make the building process of WeTransfer style layout ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in WeTransfer style layout component file.
The preview of WeTransfer style layout ui component
Free download of the WeTransfer style layout's source code
The source code of WeTransfer style layout ui component
<style>
@import url(https://cdnjs.cloudflare.com/ajax/libs/MaterialDesign-Webfont/5.3.45/css/materialdesignicons.min.css);
.bg-random {
/* @apply bg-cover bg-center */
background-image: url(https://source.unsplash.com/random);
background-size: cover;
background-position: center;
}
</style>
<div class="min-w-screen min-h-screen bg-random flex items-center justify-center px-5 py-5">
<div class="w-full mx-auto rounded-3xl shadow-xl bg-white" style="max-width: 300px">
<div class="w-full px-5 pt-8 pb-3">
<div class="rounded-full w-44 h-44 mx-auto border-8 border-gray-300 flex items-center justify-center">
<i class="mdi mdi-arrow-down text-8xl text-gray-300 leading-none"></i>
</div>
</div>
<div class="w-full px-5 text-center pb-8 border-b border-gray-300">
<h1 class="text-2xl font-light text-gray-800 leading-tight">Ready when you are</h1>
<p class="text-xs text-gray-500">Transfer expires in 7 days</p>
</div>
<ul>
<li class="w-full px-5 py-2 border-b border-gray-300">
<div class="w-full flex">
<div class="flex-grow">
<h3 class="text-sm text-gray-800 leading-tight">LoremIpsum_sitamore.zip</h3>
<p class="text-xs text-gray-500">138 MB - zip</p>
</div>
<div class="w-12 text-right">
<i class="mdi mdi-download-circle-outline text-blue-500 text-2xl"></i>
</div>
</div>
</li>
</ul>
<div class="w-full px-5 py-5 text-center">
<button class="bg-blue-500 hover:bg-blue-600 text-white rounded-full px-10 py-2 transition-colors">Download</button>
</div>
</div>
</div>
<!-- BUY ME A BEER AND HELP SUPPORT OPEN-SOURCE RESOURCES -->
<div class="flex items-end justify-end fixed bottom-0 right-0 mb-4 mr-4 z-10">
<div>
<a title="Buy me a beer" href="https://www.buymeacoffee.com/scottwindon" target="_blank" class="block w-16 h-16 rounded-full transition-all shadow hover:shadow-lg transform hover:scale-110 hover:rotate-12">
<img class="object-cover object-center w-full h-full rounded-full" src="https://i.pinimg.com/originals/60/fd/e8/60fde811b6be57094e0abc69d9c2622a.jpg"/>
</a>
</div>
</div>
How to create a WeTransfer style layout 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 create a WeTransfer style layout component
min-w-screen
min-h-screen
bg-random
flex
px-5
py-5
w-full
mx-auto
bg-white
pt-8
pb-3
w-44
h-44
border-8
border-gray-300
text-8xl
text-gray-300
text-center
pb-8
border-b
text-2xl
text-gray-800
text-xs
text-gray-500
py-2
flex-grow
text-sm
w-12
text-right
text-blue-500
bg-blue-500
hover:bg-blue-600
text-white
px-10
fixed
bottom-0
right-0
mb-4
mr-4
z-10
block
w-16
h-16
h-full
44 steps to create a WeTransfer style layout component with Tailwind CSS
Set the minimum width/height of an element using the
min-w-screen
utilities.Set the minimum width/height of an element using the
min-h-screen
utilities.Control the background color of an element to random using the
bg-random
utilities.Use
flex
to create a block-level flex container.Control the horizontal padding of an element to 1.25rem using the
px-5
utilities.Control the vertical padding of an element to 1.25rem using the
py-5
utilities.Use
w-full
to set an element to a 100% based width.Control the horizontal margin of an element to auto using the
mx-auto
utilities.Control the background color of an element to white using the
bg-white
utilities.Control the padding on top side of an element to 2rem using the
pt-8
utilities.Control the padding on bottom side of an element to 0.75rem using the
pb-3
utilities.Use
w-44
to set an element to a fixed width(11rem).Use
h-44
to set an element to a fixed height(11rem).Control the border color of an element to 2rem using the
border-8
utilities.Control the border color of an element to gray-300 using the
border-gray-300
utilities.Control the text color of an element to 8xl using the
text-8xl
utilities.Control the text color of an element to gray-300 using the
text-gray-300
utilities.Control the text color of an element to center using the
text-center
utilities.Control the padding on bottom side of an element to 2rem using the
pb-8
utilities.Control the border color of an element to b using the
border-b
utilities.Control the text color of an element to 2xl using the
text-2xl
utilities.Control the text color of an element to gray-800 using the
text-gray-800
utilities.Control the text color of an element to xs using the
text-xs
utilities.Control the text color of an element to gray-500 using the
text-gray-500
utilities.Control the vertical padding of an element to 0.5rem using the
py-2
utilities.Use
flex
to create a block-level flex container.Control the text color of an element to sm using the
text-sm
utilities.Use
w-12
to set an element to a fixed width(3rem).Control the text color of an element to right using the
text-right
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 blue-500 using the
bg-blue-500
utilities.Control the background color of an element to blue-600 using the
hover:bg-blue-600
utilities on hover.Control the text color of an element to white using the
text-white
utilities.Control the horizontal padding of an element to 2.5rem using the
px-10
utilities.Use
fixed
to position an element relative to the browser window.Use the
bottom-0
utilities to set the bottom position of a positioned element to 0rem.Use the
right-0
utilities to set the right position of a positioned element to 0rem.Control the margin on bottom side of an element to 1rem using the
mb-4
utilities.Control the margin on right side of an element to 1rem using the
mr-4
utilities.Control the stack order (or three-dimensional positioning) of an element to 10 in Tailwind, regardless of order it has been displayed, using the
z-10
utilities.Use
inline
utilities to put the element on its own line and fill its parent.Use
w-16
to set an element to a fixed width(4rem).Use
h-16
to set an element to a fixed height(4rem).Use
h-full
to set an element’s height to 100% of its parent, as long as the parent has a defined height.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to create a WeTransfer style layout components, learn and follow along to implement your own components.