Tailwind Flexbox Cheat Sheet
Eiko WagenknechtLike many web developers, I frequently reference Flexbox properties when using Tailwind CSS. While existing cheat sheets are helpful, I needed one that better matched my mental model and workflow.
This led me to create my own Flexbox cheat sheet, built with React and Tailwind CSS.
The cheat sheet features live, responsive components instead of static images, so maintenance and updates are straightforward.
The content is organized into key sections covering essential Flexbox concepts: Display, Flow Direction, Item Sizing, Wrapping, Justify Content, Align Items, Align Self, and Align Content. Each section uses visual examples to demonstrate its properties.
I also included a Node.js script that generates a landscape A4 PDF version for offline reference.
This was a fun exercise in using React components to create a self-documenting resource.
You can check out the source code (including the script to generate the PDF version) and adapt it for your own use.
Below is a preview of the cheat sheet, which presents the same content as the full version in a condensed 1-2 column layout instead of the original 6 columns. You can use your browser’s developer tools to inspect the components and see how they are built.
Tailwind CSS Flexbox Cheat Sheet
Display
Flow Direction
flex-[...]
defines the main axis (= flow direction) and cross axis (= perpendicular to flow direction).Wrapping
Item Sizing
Others
Justify Content
justify-[...]
aligns the items along the axis of the flex.Align Items
items-[...]
aligns each item along the cross axis of the flex.Align Self
self-[...]
aligns a single item along the cross axis of the flex.Align Content
content-[...]
aligns all items of a row/column together along the cross axis of the flex.Shorthands
No Comments? No Problem.
This blog doesn't support comments, but your thoughts and questions are always welcome. Reach out through the contact details in the footer below.