These items stack vertically due to their default block behavior. If this is all you need, `flex flex-col` is not required. Notice how items take full width and are left-aligned by default.
Here,
flex flex-col
is used. The "Gotcha" is that while `div`s stack by default, using `flex-col` allows us to easily apply
items-center
to horizontally center the items within the column and
space-y-3
for consistent vertical spacing. This level of control is why you'd choose `flex-col` over default block behavior.
Many elements like `div`s or `p`aragraphs stack vertically by default (they are block-level elements). You only *need* to explicitly use
flex flex-col
if:
items-center
for horizontal centering within the column,
items-start
,
items-end
).
justify-center
,
justify-between
- though this has more effect if the flex container has a fixed height).
space-y-*
.
Otherwise, default block behavior might be sufficient for simple vertical stacking.