Layout
Tailwind CSS layout components: responsive grids, containers, dividers aur page shells behtar spacing ke saath. HTML aur React code copy-paste karein.
0 Components
Layout components page ko ek structure dete hain: grids, containers, dividers aur page shells jo yeh decide karte hain ke content kaise arrange aur space hoga. Yeh category unhe Tailwind CSS ke saath, mobile-first cover karti hai.
Ek consistent layout baki sab cheezon ko aasan bana deta hai. Shared container widths aur spacing sections ko aligned rakhti hain aur aapke content ko chote phones se bade desktops tak saaf suthre tarike se adapt hone deti hain.
Aap in layout components ke saath kya kar sakte hain
Responsive grids
Ek column se shuru karein aur bade breakpoints par mazeed columns add karein taake content shrink hone ke bajaye reflow ho.
Containers aur spacing
Content ko readable width tak limit karein consistent horizontal padding aur vertical rhythm ke saath.
Page shells
Header, main content aur footer structure ek baar set up karein, phir ise tamam pages par reuse karein.
In layout components ko kyun use karein
- Mobile-first utilities base layout ko simple rakhti hain.
- Consistent spacing scales sections aur pages par ek jaisi rehti hain.
- Plain markup jisme Tailwind CSS ke ilawa koi aur dependencies nahi hain.
Layout components: aksar pooche jaane wale sawalat
Kya mujhe CSS grid use karna chahiye ya flexbox?
Rows aur columns wale two-dimensional layouts ke liye grid use karein, aur single row ya column ke liye flexbox use karein jahan items apne content ke hisab se size hoti hain.
Content container kitna wide hona chahiye?
Reading text ko lagbhag 65 se 75 characters per line tak rakhein, jo taqreeban 65ch se 75ch ki max width hoti hai, aur zyada wide elements jaise images aur tables ko zyada space use karne dein.
Main mobile par page ko sideways scroll hone se kaise rokoon?
Us element ko dhoondhein jo overflow ho raha hai aur wide content jaise tables ya code ko page wide karne ke bajaye overflow-x-auto ke saath apne container ke andar scroll hone dein.