Last updated on February 21, 2026

Container Queries

Edit

Nativewind supports container queries, allowing you to style elements based on the size of a parent container rather than the viewport. Use @container to mark an element as a query container, then apply responsive styles with container query variants like @sm:, @md:, @lg:, etc.

Usage

Please refer to the documentation on the Tailwind CSS website

Compatibility

ClassSupport
@container
✅ Full Support
@container/{name}
✅ Full Support
@sm:
✅ Full Support
@md:
✅ Full Support
@lg:
✅ Full Support
@xl:
✅ Full Support
@2xl:
✅ Full Support
@3xl:
✅ Full Support
@4xl:
✅ Full Support
@5xl:
✅ Full Support
@6xl:
✅ Full Support
@7xl:
✅ Full Support
Legend

Class

-{n} Supports values from theme

-[n] Supports arbitrary values

Icon

✅ Full support

✔️ Partial support on native

🧪 Experimental support on native

📱 Native only

🌐 Web only

On this page