Tailwind CSS container queries enable responsive grid layouts based on parent container size rather than viewport, using @container on the parent and @sm:, @md: prefixes on children for truly component-based responsiveness.
Mark the grid container with @container class, then use @md:grid-cols-2 or @lg:grid-cols-3 on child elements to change the layout when the container reaches those sizes. This creates self-contained, reusable responsive components that work regardless of page layout, perfect for design systems and modular UIs with minimal markup.
.png)

.png)
.png)