flex-initial: Tailwind CSS Flex class

The flex-initial class sets an element's flex property to its initial value: it doesn't grow or shrink and takes up only the space it needs.


flex-initial

The flex-initial class sets an element's flex property to its initial value: it doesn't grow or shrink and takes up only the space it needs.

Example Code

html
<div class="flex p-10 bg-yellow-50 space-x-5">
<div class="flex-initial bg-blue-500 p-4 text-center text-white font-bold rounded">Flex-initial</div>
<div class="bg-blue-200 p-4 flex-grow text-center text-white font-bold rounded">flex-grow</div>
</div>

Preview

Flex-initial
flex-grow

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