Last updated on September 14, 2026

Object Fit

Edit

Usage

Please refer to the documentation on the Tailwind CSS website

RC notes

For React Native Web Image and Expo Image, use explicit resizeMode or contentFit props. A utility on the outer View does not establish the nested image fit. Native image adapters and HTML img elements have separate contracts.

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
object-contain
๐ŸŒ Web only
object-cover
๐ŸŒ Web only
object-fill
๐ŸŒ Web only
object-none
๐ŸŒ Web only
object-scale-down
๐ŸŒ Web only
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