Tailwind CSS Classes

Tailwind CSS class .flex-grow / .flex-grow-0

<div class="flex bg-gray-200">
  <div class="flex-1 text-center bg-teal-400 p-2 m-2">1</div>
  <div class="flex-grow text-center bg-teal-400 p-2 m-2">2</div>
  <div class="flex-1 text-center bg-teal-400 p-2 m-2">3</div>
</div>
<div class="flex bg-gray-200">
  <div class="flex-1 text-center bg-teal-400 p-2 m-2">1</div>
  <div class="flex-grow-0 text-center bg-teal-400 p-2 m-2">2</div>
  <div class="flex-1 text-center bg-teal-400 p-2 m-2">3</div>
</div>

Preview

Are you tired of writing HTML by hand?

CSS source

.flex-grow { flex-grow: 1; }
.flex-grow-0 { flex-grow: 0; }

More Tailwind CSS classes in Flex category

© 2024 Shuffle. All rights reserved.