Responsive Design with Tailwind
Tailwind's mobile-first breakpoints make responsive design intuitive.
Breakpoints
- sm: 640px and up
- md: 768px and up
- lg: 1024px and up
- xl: 1280px and up
- 2xl: 1536px and up
Examples
<!-- Stack on mobile, row on desktop -->
<div class="flex flex-col md:flex-row">
<!-- Full width mobile, half on desktop -->
<div class="w-full md:w-1/2">
<!-- Hide on mobile, show on desktop -->
<div class="hidden lg:block">
<!-- Different padding per breakpoint -->
<div class="p-4 md:p-6 lg:p-8">
Grid Layouts
<!-- 1 col mobile, 2 tablet, 3 desktop -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
</div>
Typography
<h1 class="text-2xl md:text-4xl lg:text-6xl">
Responsive Heading
</h1>
Need Tailwind development? Contact ProWeb Nigeria.
P
ProWeb Nigeria
ProWeb Nigeria helps businesses grow online with modern web design and SEO strategy.
