Last updated on March 19, 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

Support applies to the documented values and platforms. See the RC compatibility notes for value limits and native migration alternatives. Browser behavior is evaluated separately.

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

Class

-{n} Supports values from theme

-[n] Supports arbitrary values

Icon

✅ Supported

✔️ Partial support on native

🧪 Experimental support on native

📱 Native only

Not supported on native: rejected by the native CSS engine

🌐 Web only

On this page