Tailwind Commands Cheat Sheet

Tailwind CSS is a utility-first CSS framework packed with classes that can be composed to build any design, directly in your markup.

Underline:

underline
underline-offset-<size>
decoration-<color>-<shade> //color for underline
de…


This content originally appeared on DEV Community and was authored by Madhav Ganesan

Tailwind CSS is a utility-first CSS framework packed with classes that can be composed to build any design, directly in your markup.

Underline:

underline 
underline-offset-<size>
decoration-<color>-<shade> //color for underline
decoration-<thickness> // size of underline
decoration-<style> // wavy, double

Text Styling

text-<color>-<shade> //color of text
text-opacity-<shade> //opacity of text
text-<size> //size of text
text-<alignment> //alignment of text

Background Color

bg-<color>-<shade>

Border Radius

rounded-<size> 

Font Styling

font-<style> //mono, serif, sans
font-bold
font-thin

Italic:

italic

Visibility

Hide elements:

hidden

Display (Opposite to hide):

block

Padding

p-<size>   /* All sides */
px-<size>  /* Horizontal (left and right) */
py-<size>  /* Vertical (top and bottom) */
pl-<size>  /* Left */
pr-<size>  /* Right */
pt-<size>  /* Top */
pb-<size>  /* Bottom */

Margin

m-<size>   /* All sides */
mx-<size>  /* Horizontal (left and right) */
my-<size>  /* Vertical (top and bottom) */
ml-<size>  /* Left */
mr-<size>  /* Right */
mt-<size>  /* Top */
mb-<size>  /* Bottom */

Flexbox

flex
flex-<direction> // row or column

Justify Content

justify-<option>

Align Items

items-<option> //start,end,center

Responsive Design

sm  /* Small devices */
md  /* Medium devices */
lg  /* Large devices */
xl  /* Extra large devices */

Sizing

h-<size>
w-<size>

Borders

border
border-<size>
border-<color>

Hover States

hover:<utility>


This content originally appeared on DEV Community and was authored by Madhav Ganesan


Print Share Comment Cite Upload Translate Updates
APA

Madhav Ganesan | Sciencx (2024-07-13T13:54:02+00:00) Tailwind Commands Cheat Sheet. Retrieved from https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/

MLA
" » Tailwind Commands Cheat Sheet." Madhav Ganesan | Sciencx - Saturday July 13, 2024, https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/
HARVARD
Madhav Ganesan | Sciencx Saturday July 13, 2024 » Tailwind Commands Cheat Sheet., viewed ,<https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/>
VANCOUVER
Madhav Ganesan | Sciencx - » Tailwind Commands Cheat Sheet. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/
CHICAGO
" » Tailwind Commands Cheat Sheet." Madhav Ganesan | Sciencx - Accessed . https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/
IEEE
" » Tailwind Commands Cheat Sheet." Madhav Ganesan | Sciencx [Online]. Available: https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/. [Accessed: ]
rf:citation
» Tailwind Commands Cheat Sheet | Madhav Ganesan | Sciencx | https://www.scien.cx/2024/07/13/tailwind-commands-cheat-sheet/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.