Container

Container creates a CSS Container with inline-size.


Use Container Queries

No need to declare container-type all the time. Just use Container in a parent element and you’ll enable container queries for all children elements

index.html
<div class="Container">
<div class="w-[75cqw]"> ... </div>
</div>
75% of the container’s width

Use container breakpoints with less effort

Want to make your component change orientation when the container is wider than 400px? Just use @bp4 which creates a breakpoint at 400px — courtesy of our Tailwind Layout Preset.

index.html
<div class="Container">
<div class="Vertical @bp4:Horizontal">...</div>
</div>
Resize to see this work!
One
Two
Three