giovictor
12/20/2019 - 8:10 AM

Tailwind Guide

Container Classes

  • mx-auto - center elements horizontally
  • h-full - take up the full height of the browser
  • h-screen - take up the entire screen
  • flex - to make the container a flexbox
  • justify-center - CSS equivalent of justify-content:center;
  • items-center - CSS equivalent of align-items:center;

Spacing, Color, Size and Text Classes

  • w-[NUMBER] - width of an element (max: 64)
  • bg-[COLOR]-[NUMBER] - background color of an element
  • p-[NUMBER] - padding on all sides
  • px-[NUMBER] - padding on left and right
  • py-[NUMBER] - padding on top and bottom
  • rounded-[SIZE] - add border-radius to element
  • shadow-[SIZE] - add box-shadow to element
  • text-[COLOR]-[NUMBER] - text color of an element

Breakpoints

  • sm - 640px and up
  • md - 768px and up
  • lg - 1024px and up
  • xl - 1280px and up