min-w-fit: Tailwind CSS Width class

The min-w-fit class ensures the element width adapts to fit its content without being smaller.


Min-w-fit

The min-w-fit class ensures the element's width adapts to fit its content without being smaller.

Example Code

html
<div class="flex justify-center items-center gap-2 p-3 rounded-t-md bg-indigo-50">
<div class="min-w-fit bg-indigo-500 py-4 text-white font-bold rounded-lg px-4">
min-w-fit
</div>
</div>

Preview

min-w-fit

Windframe is a drag and drop builder for rapidly building tailwind css websites and UIs

Start building stunning tailwind UIs! 

Build from scratch or select prebuilt tailwind templates