- Published on
Most Effective Ways To Create A Instagram Feed Respnsive With Tailwind CSS

- What is Tailwind CSS?
- The description of instagram feed Respnsive ui component
- Why use Tailwind CSS to create a instagram feed Respnsive ui component?
- The preview of instagram feed Respnsive ui component
- The source code of instagram feed Respnsive ui component
- How to create a instagram feed Respnsive with Tailwind CSS?
- Install tailwind css of verion 2.2.4
- All the unility class needed to create a instagram feed Respnsive component
- 82 steps to create a instagram feed Respnsive 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 instagram feed Respnsive ui component
This is redesign feed of instagram
Why use Tailwind CSS to create a instagram feed Respnsive ui component?
- It can make the building process of instagram feed Respnsive ui component faster and more easily.
- Enables building complex responsive layouts and components freely.
- Minimum lines of CSS code in instagram feed Respnsive component file.
The preview of instagram feed Respnsive ui component
Free download of the instagram feed Respnsive's source code
The source code of instagram feed Respnsive ui component
<!-- This is an example component -->
<script defer src="https://unpkg.com/[email protected]/dist/cdn.min.js"></script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Varela&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Karla:[email protected]&display=swap');
* {
font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
direction: ltr;
font-weight: 500;
}
</style>
<div class="mx-auto flex justify-center items-center filter blur-2xl animate-pulse duration-500 transition w-full">
<div class="mt-20 mr-10 flex relative">
<div class="p-44 rounded-full bg-gradient-to-r to-indigo-700 from-pink-900 absolute top-20 right-0">
</div>
<div class="p-44 rounded-full bg-gradient-to-r to-pink-700 from-indigo-900 absolute md:flex hidden">
</div>
</div>
<!-- Right Side -->
<div class="flex flex-col absolute top-8 right-10 space-y-4">
<div class="p-5 rounded-full bg-gradient-to-r to-pink-700 via-red-500 from-indigo-900 absolute right-16 top-10">
</div>
</div>
<div class="flex flex-col absolute bottom-8 right-10 space-y-4">
<div class="p-10 rounded-full bg-gradient-to-r to-pink-700 from-indigo-900 absolute right-16 bottom-10">
</div>
</div>
<!-- Left side -->
<div class="flex flex-col space-y-4 filter animate-pulse duration-500">
<div class="p-10 bg-gradient-to-r to-indigo-700 from-blue-900 absolute top-20 left-20">
</div>
<div class="p-10 bg-gradient-to-r to-indigo-700 from-blue-900 absolute bottom-20 right-20">
</div>
</div>
</div>
<div class="mx-auto flex justify-center max-w-3xl md:mb-8 mt-4 bg-white rounded-lg items-center relative md:p-0 p-8"
x-data="{
comment : false,
}">
<div class="h-full relative">
<div class="py-2 px-2">
<div class="flex justify-between items-center py-2">
<div class="relative mt-1 flex">
<div class="mr-2">
<img src="https://avatars.githubusercontent.com/u/68494287?v=4" alt="saman sayyar"
class="w-10 h-10 rounded-full object-cover">
</div>
<div class="ml-3 flex justify-start flex-col items-start">
<p class="text-gray-900 text-sm">
samansayyar
</p>
<p class="text-gray-600 text-xs">
samansayyar
</p>
</div>
<!-- <span class="text-xs mx-2">•</span>
<button class="text-indigo-500 text-sm capitalize flex justify-start items-start">follow</button> -->
</div>
<button type="button"
class="relative p-2 focus:outline-none border-none bg-gray-100 rounded-full">
<svg class="w-5 h-5 text-gray-700" 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="M12 5v.01M12 12v.01M12 19v.01M12 6a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2zm0 7a1 1 0 110-2 1 1 0 010 2z">
</path>
</svg>
</button>
</div>
</div>
<div class="relative w-full h-full">
<img src="https://wallpaperaccess.com/full/345330.jpg" alt="saman" class="rounded-lg w-full h-full object-cover">
</div>
<div class="">
<!-- Comment -->
<div class="overflow-y-scroll w-full absolute inset-0 bg-white transform transition duration-200"
x-show="comment" x-transition:enter="transition ease-out duration-200"
x-transition:enter-start="opacity-0 transform scale-90"
x-transition:enter-end="opacity-100 transform scale-100"
x-transition:leave="transition ease-in duration-100"
x-transition:leave-start="opacity-100 transform scale-100"
x-transition:leave-end="opacity-0 transform scale-90">
<div class="flex justify-start items-center py-2 px-4 border-b" @click="comment = !comment">
<svg class="w-8 h-8 text-gray-700" 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="1.5"
d="M7 16l-4-4m0 0l4-4m-4 4h18"></path>
</svg>
</div>
<div class="p-2 mb-10">
<!-- System Comment -->
<div
class="flex justify-start flex-col space-y-3 items-start px-2 border-b border-gray-100">
<div class="relative mt-1 mb-3 pt-2 flex">
<div class="mr-2">
<img src="https://avatars.githubusercontent.com/u/68494287?v=4" alt="saman sayyar"
class="w-8 h-8 rounded-full object-cover">
</div>
<div class="ml-2 w-full" x-data="{ replies : false }">
<p class="text-gray-600 md:text-sm text-xs w-full">
<!-- Username User -->
<span class="font-normal text-gray-900">samansayyar</span>
<!-- Username User -->
You Can see?
</p>
<div class="flex space-x-4">
<div class="time mt-1 text-gray-400 text-xs">
<p>2d</p>
</div>
<button type="button" class="focus:outline-none time mt-1 text-gray-400 text-xs">
<p>replay</p>
</button>
</div>
<button type="button" @click="replies = !replies" class="focus:outline-none mt-3 flex justify-center items-center">
<p class="text-xs text-center text-indigo-500 flex space-x-2">
<span>____ View replies (1)</span> <svg class="w-3 h-4" 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="M19 9l-7 7-7-7"></path></svg>
</p>
</button>
<div x-show="replies" x-transition
class="flex justify-start flex-col space-y-3 items-start px-2 border-b border-gray-100">
<div class="relative mt-1 mb-3 pt-2 flex">
<div class="mr-2">
<img src="https://avatars.githubusercontent.com/u/68494287?v=4" alt="saman sayyar"
class="w-8 h-8 rounded-full object-cover">
</div>
<div class="ml-2 w-full" x-data="{ replies : true }">
<p class="text-gray-600 md:text-sm text-xs w-full">
<!-- Username User -->
<span class="font-normal text-gray-900">samansayyar</span>
<!-- Username User -->
You Can see?
</p>
<div class="flex space-x-4">
<div class="time mt-1 text-gray-400 text-xs">
<p>2d</p>
</div>
<button type="button" class="focus:outline-none time mt-1 text-gray-400 text-xs">
<p>replay</p>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class="flex justify-start flex-col space-y-3 items-start px-2 border-b border-gray-100">
<div class="relative mt-1 mb-3 pt-2 flex">
<div class="mr-2">
<img src="https://avatars.githubusercontent.com/u/68494287?v=4" alt="saman sayyar"
class="w-8 h-8 rounded-full object-cover">
</div>
<div class="ml-2 w-full">
<p class="text-gray-600 md:text-sm text-xs w-full">
<!-- Username User -->
<span class="font-normal text-gray-900">samansayyar</span>
<!-- Username User -->
You Can see?
</p>
<div class="time mt-1 text-gray-400 text-xs">
<p>2d</p>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- System Like and tools Feed -->
<div class="flex justify-between items-start p-2 py-">
<div class="flex space-x-2 items-center">
<button type="button" class="focus:outline-none Like"><svg class="w-8 h-8 text-gray-600" 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="1.6" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"></path></svg></button>
<button type="button" class="focus:outline-none Comment" @click="comment = !comment"><svg class="w-8 h-8 text-gray-600" 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="1.6" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg></button>
<button type="button" class="focus:outline-none save"><svg class="w-7 h-7 mb-1 ml-1 text-gray-600 z-10" 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="1.6" d="M12 19l9 2-9-18-9 18 9-2zm0 0v-8"></path></svg></button>
</div>
<div class="flex space-x-2 items-center">
<button type="button" class="focus:outline-none Like"><svg class="w-8 h-8 text-gray-600" 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="1.6" d="M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"></path></svg></button>
</div>
</div>
<div class="p-2 flex flex-col space-y-3">
<div class="w-full">
<p class="font-bold text-sm text-gray-700">234 likes</p>
</div>
<div class="w-full">
<p class="font-normal text-xs text-gray-500">10 hours ago</p>
</div>
</div>
<!-- End System Like and tools Feed -->
<div class="z-50">
<form>
<div class="flex justify-between border-t items-center w-full"
:class="comment ? 'absolute bottom-0' : '' ">
<div class="w-full ">
<input type="text" name="comment" id="comment" placeholder="Add A Comment..."
class="w-full text-sm py-4 px-3 rounded-none focus:outline-none">
</div>
<div class="w-20">
<button class="border-none text-sm px-4 bg-white py-4 text-indigo-600 focus:outline-none">Post</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
How to create a instagram feed Respnsive with Tailwind CSS?
Install tailwind css of verion 2.2.4
Use the script
html tag to import the script of Tailwind CSS of the version 2.2.4
<script src="https://cdn.tailwindcss.com"></script>
All the unility class needed to create a instagram feed Respnsive component
mx-auto
flex
w-full
mt-20
mr-10
relative
p-44
bg-gradient-to-r
absolute
top-20
right-0
md:flex
hidden
flex-col
top-8
right-10
p-5
right-16
top-10
bottom-8
p-10
bottom-10
left-20
bottom-20
right-20
max-w-3xl
md:mb-8
mt-4
bg-white
md:p-0
p-8
h-full
py-2
px-2
mt-1
mr-2
w-10
h-10
ml-3
justify-start
text-gray-900
text-sm
text-gray-600
text-xs
mx-2
text-indigo-500
p-2
border-none
bg-gray-100
w-5
h-5
text-gray-700
overflow-y-scroll
px-4
border-b
w-8
h-8
mb-10
border-gray-100
mb-3
pt-2
ml-2
md:text-sm
text-gray-400
mt-3
text-center
w-3
h-4
py-
w-7
h-7
mb-1
ml-1
z-10
text-gray-500
z-50
border-t
bottom-0
py-4
px-3
w-20
text-indigo-600
82 steps to create a instagram feed Respnsive component with Tailwind CSS
Control the horizontal margin of an element to auto using the
mx-auto
utilities.Use
flex
to create a block-level flex container.Use
w-full
to set an element to a 100% based width.Control the margin on top side of an element to 5rem using the
mt-20
utilities.Control the margin on right side of an element to 2.5rem using the
mr-10
utilities.Use
relative
to position an element according to the normal flow of the document.Control the padding on all sides of an element to 11rem using the
p-44
utilities.Control the background color of an element to gradient-to-r using the
bg-gradient-to-r
utilities.Use
absolute
to position an element outside of the normal flow of the document, causing neighboring elements to act as if the element doesn’t exist.Use the
top-20
utilities to set the top position of a positioned element to 5rem.Use the
right-0
utilities to set the right position of a positioned element to 0rem.Use
flex
to create a block-level flex container at only medium screen sizes.Use
hidden
to set an element to display: none and remove it from the page layout.Use
flex
to create a block-level flex container.Use the
top-8
utilities to set the top position of a positioned element to 2rem.Use the
right-10
utilities to set the right position of a positioned element to 2.5rem.Control the padding on all sides of an element to 1.25rem using the
p-5
utilities.Use the
right-16
utilities to set the right position of a positioned element to 4rem.Use the
top-10
utilities to set the top position of a positioned element to 2.5rem.Use the
bottom-8
utilities to set the bottom position of a positioned element to 2rem.Control the padding on all sides of an element to 2.5rem using the
p-10
utilities.Use the
bottom-10
utilities to set the bottom position of a positioned element to 2.5rem.Use the
left-20
utilities to set the left position of a positioned element to 5rem.Use the
bottom-20
utilities to set the bottom position of a positioned element to 5rem.Use the
right-20
utilities to set the right position of a positioned element to 5rem.Set the maximum width/height of an element using the
max-w-3xl
utilities.Control the margin on bottom side of an element to 2rem at only medium screen sizes using the
md:mb-8
utilities.Control the margin on top side of an element to 1rem using the
mt-4
utilities.Control the background color of an element to white using the
bg-white
utilities.Control the padding on all sides of an element to 0rem at only medium screen sizes using the
md:p-0
utilities.Control the padding on all sides of an element to 2rem using the
p-8
utilities.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 vertical padding of an element to 0.5rem using the
py-2
utilities.Control the horizontal padding of an element to 0.5rem using the
px-2
utilities.Control the margin on top side of an element to 0.25rem using the
mt-1
utilities.Control the margin on right side of an element to 0.5rem using the
mr-2
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).Control the margin on left side of an element to 0.75rem using the
ml-3
utilities.Use
justify-start
to justify items against the start of the container’s main axis.Control the text color of an element to gray-900 using the
text-gray-900
utilities.Control the text color of an element to sm using the
text-sm
utilities.Control the text color of an element to gray-600 using the
text-gray-600
utilities.Control the text color of an element to xs using the
text-xs
utilities.Control the horizontal margin of an element to 0.5rem using the
mx-2
utilities.Control the text color of an element to indigo-500 using the
text-indigo-500
utilities.Control the padding on all sides of an element to 0.5rem using the
p-2
utilities.Control the border color of an element to none using the
border-none
utilities.Control the background color of an element to gray-100 using the
bg-gray-100
utilities.Use
w-5
to set an element to a fixed width(1.25rem).Use
h-5
to set an element to a fixed height(1.25rem).Control the text color of an element to gray-700 using the
text-gray-700
utilities.Use
overflow-y-scroll
to allow vertical scrolling and always show scrollbars unless always-visible scrollbars are disabled by the operating system.Control the horizontal padding of an element to 1rem using the
px-4
utilities.Control the border color of an element to b using the
border-b
utilities.Use
w-8
to set an element to a fixed width(2rem).Use
h-8
to set an element to a fixed height(2rem).Control the margin on bottom side of an element to 2.5rem using the
mb-10
utilities.Control the border color of an element to gray-100 using the
border-gray-100
utilities.Control the margin on bottom side of an element to 0.75rem using the
mb-3
utilities.Control the padding on top side of an element to 0.5rem using the
pt-2
utilities.Control the margin on left side of an element to 0.5rem using the
ml-2
utilities.Control the text color of an element to sm at only medium screen sizes using the
md:text-sm
utilities.Control the text color of an element to gray-400 using the
text-gray-400
utilities.Control the margin on top side of an element to 0.75rem using the
mt-3
utilities.Control the text color of an element to center using the
text-center
utilities.Use
w-3
to set an element to a fixed width(0.75rem).Use
h-4
to set an element to a fixed height(1rem).Control the vertical padding of an element to using the
py-
utilities.Use
w-7
to set an element to a fixed width(1.75rem).Use
h-7
to set an element to a fixed height(1.75rem).Control the margin on bottom side of an element to 0.25rem using the
mb-1
utilities.Control the margin on left side of an element to 0.25rem using the
ml-1
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.Control the text color of an element to gray-500 using the
text-gray-500
utilities.Control the stack order (or three-dimensional positioning) of an element to 50 in Tailwind, regardless of order it has been displayed, using the
z-50
utilities.Control the border color of an element to t using the
border-t
utilities.Use the
bottom-0
utilities to set the bottom position of a positioned element to 0rem.Control the vertical padding of an element to 1rem using the
py-4
utilities.Control the horizontal padding of an element to 0.75rem using the
px-3
utilities.Use
w-20
to set an element to a fixed width(5rem).Control the text color of an element to indigo-600 using the
text-indigo-600
utilities.
Conclusion
The above is a step-by-step tutorial on how to use Tailwind CSS to create a instagram feed Respnsive components, learn and follow along to implement your own components.