📖 Guide

Tailwind CSS Reference

Complete Tailwind CSS reference — layout, spacing, typography, colors, responsive design, states, and common patterns.

208 commands across 13 categories

Layout

CommandDescription
block
display: block
inline-block
display: inline-block
inline
display: inline
flex
display: flex
inline-flex
display: inline-flex
grid
display: grid
inline-grid
display: inline-grid
hidden
display: none
static
position: static
relative
position: relative
absolute
position: absolute
fixed
position: fixed
sticky
position: sticky
top-0 right-0 bottom-0 left-0
Position offsets — set to 0
inset-0
top/right/bottom/left all 0 (shorthand)
inset-x-0
left: 0; right: 0
inset-y-0
top: 0; bottom: 0
z-10 / z-20 / z-30 / z-40 / z-50
z-index values
z-auto
z-index: auto
overflow-hidden
overflow: hidden
overflow-auto
overflow: auto
overflow-scroll
overflow: scroll
overflow-x-auto
overflow-x: auto (horizontal scrolling)
container
Responsive container — max-width at each breakpoint
mx-auto
Center a block element horizontally

Flexbox

CommandDescription
flex-row
flex-direction: row (default)
flex-col
flex-direction: column
flex-row-reverse
flex-direction: row-reverse
flex-col-reverse
flex-direction: column-reverse
flex-wrap
flex-wrap: wrap
flex-nowrap
flex-wrap: nowrap
flex-1
flex: 1 1 0% — grow and shrink, ignore initial size
flex-auto
flex: 1 1 auto — grow and shrink, consider initial size
flex-initial
flex: 0 1 auto — shrink but don't grow
flex-none
flex: none — don't grow or shrink
grow
flex-grow: 1
grow-0
flex-grow: 0
shrink
flex-shrink: 1
shrink-0
flex-shrink: 0
justify-start
justify-content: flex-start
justify-center
justify-content: center
justify-end
justify-content: flex-end
justify-between
justify-content: space-between
justify-around
justify-content: space-around
justify-evenly
justify-content: space-evenly
items-start
align-items: flex-start
items-center
align-items: center
items-end
align-items: flex-end
items-stretch
align-items: stretch
items-baseline
align-items: baseline
self-auto / self-start / self-center / self-end / self-stretch
align-self utilities

Grid

CommandDescription
grid-cols-1 / grid-cols-2 / ... / grid-cols-12
grid-template-columns with N equal columns
grid-cols-none
grid-template-columns: none
grid-rows-1 / grid-rows-2 / ... / grid-rows-6
grid-template-rows with N equal rows
col-span-1 / col-span-2 / ... / col-span-12
Span N columns
col-span-full
grid-column: 1 / -1 (span all columns)
col-start-1 / col-end-3
Grid column start and end lines
row-span-1 / row-span-2 / ... / row-span-6
Span N rows
row-span-full
grid-row: 1 / -1 (span all rows)
auto-cols-auto / auto-cols-fr / auto-cols-min / auto-cols-max
grid-auto-columns utilities
grid-flow-row / grid-flow-col / grid-flow-dense
grid-auto-flow utilities

Spacing

CommandDescription
p-0 / p-1 / p-2 / p-4 / p-6 / p-8
Padding all sides (0=0, 1=0.25rem, 2=0.5rem, 4=1rem, etc.)
px-4
Horizontal padding (left + right)
py-4
Vertical padding (top + bottom)
pt-4 / pr-4 / pb-4 / pl-4
Padding for individual sides
m-0 / m-1 / m-2 / m-4 / m-6 / m-8
Margin all sides
mx-4
Horizontal margin (left + right)
my-4
Vertical margin (top + bottom)
mt-4 / mr-4 / mb-4 / ml-4
Margin for individual sides
m-auto
margin: auto
-mt-4
Negative margin (top): -1rem
space-x-4
Horizontal space between children (uses margin)
space-y-4
Vertical space between children
gap-4
Gap between flex/grid children (1rem)
gap-x-4 / gap-y-4
Column gap / row gap separately
p-[13px]
e.g. padding: 13px
Arbitrary padding value

Sizing

CommandDescription
w-0 / w-1 / w-4 / w-8 / w-16 / w-32 / w-64
Fixed widths (0=0, 4=1rem, 16=4rem, etc.)
w-full
width: 100%
w-screen
width: 100vw
w-auto
width: auto
w-1/2 / w-1/3 / w-2/3 / w-1/4 / w-3/4
Fractional widths
w-fit
width: fit-content
w-min
width: min-content
w-max
width: max-content
min-w-0 / min-w-full
min-width utilities
max-w-sm / max-w-md / max-w-lg / max-w-xl / max-w-2xl
max-width: 24rem / 28rem / 32rem / 36rem / 42rem
max-w-screen-sm / max-w-screen-md / max-w-screen-lg
max-width matching breakpoints
max-w-prose
max-width: 65ch (ideal reading width)
max-w-none
max-width: none
h-0 / h-4 / h-8 / h-16 / h-32 / h-64
Fixed heights
h-full
height: 100%
h-screen
height: 100vh
h-dvh
height: 100dvh (dynamic viewport height — mobile friendly)
min-h-0 / min-h-full / min-h-screen
min-height utilities
max-h-screen / max-h-full
max-height utilities
size-4 / size-8 / size-16
Set width and height simultaneously
aspect-square
aspect-ratio: 1 / 1
aspect-video
aspect-ratio: 16 / 9

Typography

CommandDescription
text-xs / text-sm / text-base / text-lg / text-xl / text-2xl / text-3xl
Font sizes (0.75rem to 1.875rem)
text-4xl / text-5xl / text-6xl / text-7xl / text-8xl / text-9xl
Large font sizes (2.25rem to 8rem)
font-thin / font-light / font-normal / font-medium
Font weights: 100, 300, 400, 500
font-semibold / font-bold / font-extrabold / font-black
Font weights: 600, 700, 800, 900
font-sans / font-serif / font-mono
Font family
italic / not-italic
Font style
leading-none / leading-tight / leading-normal / leading-relaxed / leading-loose
Line height (1, 1.25, 1.5, 1.625, 2)
tracking-tighter / tracking-tight / tracking-normal / tracking-wide / tracking-wider / tracking-widest
Letter spacing
text-left / text-center / text-right / text-justify
Text alignment
underline / line-through / no-underline
Text decoration
uppercase / lowercase / capitalize / normal-case
Text transform
truncate
Truncate with ellipsis (overflow: hidden, text-overflow: ellipsis, white-space: nowrap)
line-clamp-1 / line-clamp-2 / line-clamp-3
Limit text to N lines with ellipsis
whitespace-nowrap / whitespace-pre / whitespace-pre-wrap
White space handling
break-words / break-all
Word breaking behavior

Colors & Backgrounds

CommandDescription
text-black / text-white
Text color: black or white
text-gray-500 / text-gray-700 / text-gray-900
Text color with shade (50–950)
text-blue-500 / text-red-500 / text-green-500
Text color with color name
text-transparent
color: transparent
text-inherit
color: inherit
bg-white / bg-black / bg-transparent
Background color
bg-gray-100 / bg-blue-500 / bg-red-50
Background color with shade
bg-gradient-to-r from-blue-500 to-purple-500
Linear gradient left to right
bg-gradient-to-br from-pink-500 via-red-500 to-yellow-500
Gradient with via (middle) color
bg-[#1da1f2]
Arbitrary background color value
text-blue-500/50
Text color with 50% opacity
bg-black/75
Background with 75% opacity

Borders & Rounded

CommandDescription
border
border-width: 1px
border-2 / border-4 / border-8
border-width: 2px / 4px / 8px
border-0
border-width: 0
border-t / border-r / border-b / border-l
Border on individual sides
border-gray-200 / border-blue-500
Border color
border-solid / border-dashed / border-dotted / border-none
Border style
rounded
border-radius: 0.25rem
rounded-md
border-radius: 0.375rem
rounded-lg
border-radius: 0.5rem
rounded-xl / rounded-2xl / rounded-3xl
Larger border radius values
rounded-full
border-radius: 9999px (circle/pill)
rounded-none
border-radius: 0
rounded-t-lg / rounded-b-lg
Rounded top / bottom only
rounded-tl-lg / rounded-br-lg
Rounded individual corners
divide-y / divide-x
Add borders between children (horizontal/vertical)
divide-gray-200
Set divider color
ring-2 ring-blue-500
Box shadow ring (outline without affecting layout)
ring-offset-2
Add space between ring and element

Effects

CommandDescription
shadow-sm / shadow / shadow-md / shadow-lg / shadow-xl / shadow-2xl
Box shadow sizes
shadow-none
Remove box shadow
shadow-inner
Inset box shadow
opacity-0 / opacity-25 / opacity-50 / opacity-75 / opacity-100
Element opacity
mix-blend-multiply / mix-blend-screen / mix-blend-overlay
Mix blend modes
blur-sm / blur / blur-md / blur-lg / blur-xl
Blur filter
brightness-50 / brightness-100 / brightness-150
Brightness filter
grayscale / grayscale-0
Grayscale filter
backdrop-blur-sm / backdrop-blur-md
Backdrop blur (for glass effects)
cursor-pointer / cursor-not-allowed / cursor-wait
Cursor style
select-none / select-text / select-all
User text selection behavior
pointer-events-none / pointer-events-auto
Pointer events behavior

Responsive Design

CommandDescription
sm:flex
Apply flex at ≥640px
md:grid-cols-2
Two columns at ≥768px
lg:grid-cols-3
Three columns at ≥1024px
xl:grid-cols-4
Four columns at ≥1280px
2xl:max-w-7xl
Max width at ≥1536px
sm:hidden md:block
Hidden on small, visible on medium+
text-sm md:text-base lg:text-lg
Responsive font sizes
p-4 md:p-8 lg:p-12
Responsive padding
flex-col md:flex-row
Stack on mobile, row on desktop
w-full md:w-1/2 lg:w-1/3
Responsive widths
max-sm:hidden
Hidden below sm breakpoint (Tailwind v3.2+)

States

CommandDescription
hover:bg-blue-600
Background on hover
focus:outline-none focus:ring-2
Remove outline, add ring on focus
active:bg-blue-700
Background when actively pressed
disabled:opacity-50 disabled:cursor-not-allowed
Styles for disabled elements
first:mt-0 last:mb-0
Remove margin from first/last child
odd:bg-gray-50 even:bg-white
Alternating row colors
group-hover:text-blue-500
Style child when parent (group) is hovered
peer-focus:text-blue-500
Style sibling when peer element is focused
placeholder:text-gray-400
Placeholder text style
focus-within:ring-2
Ring when any child has focus
focus-visible:ring-2
Ring only on keyboard focus (not mouse)
dark:bg-gray-900 dark:text-white
Dark mode styles
aria-selected:bg-blue-100
Style based on ARIA attribute
data-[state=open]:bg-gray-100
Style based on data attribute

Transitions & Animation

CommandDescription
transition
Transition all properties (150ms ease)
transition-colors
Transition color properties only
transition-opacity
Transition opacity only
transition-transform
Transition transform only
transition-all
Transition all properties
transition-none
Disable transitions
duration-75 / duration-100 / duration-150 / duration-200 / duration-300 / duration-500
Transition duration in ms
ease-linear / ease-in / ease-out / ease-in-out
Transition timing function
delay-100 / delay-200 / delay-300 / delay-500
Transition delay in ms
animate-spin
Continuous rotation animation
animate-ping
Ping/pulse animation (like a notification dot)
animate-pulse
Gentle fade in/out (loading skeleton)
animate-bounce
Bouncing animation
animate-none
Remove animation
transform / -translate-x-1/2 / -translate-y-1/2
Center with transform translate
scale-95 hover:scale-100
Scale transform with hover
rotate-45 / -rotate-45
Rotate transform

Common Patterns

CommandDescription
flex items-center justify-center min-h-screen
Center content on page
flex items-center justify-between px-4 h-16
Navbar layout
max-w-7xl mx-auto px-4 sm:px-6 lg:px-8
Responsive container with centered content
grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6
Responsive card grid
fixed inset-0 bg-black/50 flex items-center justify-center z-50
Modal overlay
sr-only
Screen reader only (visually hidden, accessible)
not-sr-only
Undo sr-only
truncate / overflow-hidden text-ellipsis whitespace-nowrap
Text truncation
absolute inset-0
Cover parent completely (needs relative parent)
sticky top-0 z-10 bg-white/80 backdrop-blur
Sticky glass header
prose prose-lg
Beautiful typography for articles (requires @tailwindcss/typography)

More Guides

🌿
Git Commands
Complete Git command reference — from basics to advanced workflows. Searchable, with examples.
📝
Vim Commands
Complete Vim/Vi command reference — modes, motions, editing, search, and advanced features.
🐳
Docker Commands
Complete Docker & Docker Compose command reference — containers, images, volumes, networks, and orchestration.
🔤
Regex Reference
Complete regular expression reference — syntax, patterns, quantifiers, groups, lookaheads, and common recipes.
🐧
Linux Commands
Complete Linux/Bash command reference — file management, text processing, networking, system admin, and shell scripting.
☸️
Kubernetes Commands
Complete Kubernetes & kubectl command reference — pods, deployments, services, configmaps, and cluster management.
🐍
Python Reference
Complete Python reference — syntax, data structures, string methods, file I/O, comprehensions, and common patterns.
🗃️
SQL Reference
Complete SQL reference — queries, joins, aggregation, subqueries, indexes, and database management.
🌐
Nginx Reference
Complete Nginx configuration reference — server blocks, locations, proxying, SSL, load balancing, and caching.
🔐
SSH Commands
Complete SSH reference — connections, key management, tunneling, config, SCP/SFTP, and security hardening.
👷
Jenkins Reference
Complete Jenkins reference — pipeline syntax, Jenkinsfile, plugins, CLI, agents, and CI/CD patterns.
📨
HTTP Headers Reference
Complete HTTP headers reference — request headers, response headers, caching, security, CORS, and content negotiation. Searchable, with examples.
🐘
PostgreSQL Reference
Comprehensive PostgreSQL reference — from connection basics to advanced features like JSONB, full-text search, window functions, and performance tuning.
Async Patterns Reference
Multi-language async/concurrency patterns — JavaScript, Python, Go, Rust, Java, and universal concurrency patterns.
📡
Protobuf & gRPC Reference
Comprehensive reference for Protocol Buffers (proto3) and gRPC — message definitions, services, streaming, and common patterns.
📚
JS Array Methods
Complete JavaScript Array methods reference — creating, searching, transforming, sorting, iterating, and common patterns. Searchable, with examples.
GraphQL Reference
Complete GraphQL reference — schema definition, types, queries, mutations, directives, fragments, and common patterns. Searchable, with examples.
💻
VS Code Shortcuts
Complete VS Code keyboard shortcuts — editing, navigation, search, multi-cursor, terminal, debug, and more. Searchable, with Cmd/Ctrl notation.
🔲
CSS Grid Reference
Complete CSS Grid reference — container properties, item placement, grid functions, and common layout patterns. Searchable, with examples.
📦
CSS Flexbox Reference
Complete CSS Flexbox reference — container properties, item properties, and common layout patterns. Searchable, with examples.
⚛️
React Hooks Reference
Complete React Hooks reference — useState, useEffect, useContext, custom hooks, and common patterns. Searchable, with examples.
🔷
TypeScript Reference
Complete TypeScript reference — types, interfaces, generics, utility types, and advanced patterns. Searchable, with examples.
☁️
AWS CLI Reference
Complete AWS CLI reference — EC2, S3, IAM, Lambda, ECS, RDS, CloudFormation, and common operations.
🐹
Go Reference
Complete Go (Golang) reference — syntax, types, functions, concurrency, error handling, and common patterns.
💠
PowerShell Reference
Complete PowerShell reference — cmdlets, pipelines, scripting, file operations, remote management, and Active Directory.
💾
Redis Commands
Complete Redis command reference — strings, hashes, lists, sets, sorted sets, pub/sub, transactions, and server management.
🏗️
Terraform Commands
Complete Terraform reference — init, plan, apply, state management, modules, workspaces, and HCL syntax.
⚙️
Ansible Commands
Complete Ansible reference — playbooks, modules, inventory, roles, vault, and ad-hoc commands.
🟨
JavaScript
Complete JavaScript reference — variables, types, operators, strings, arrays, objects, functions, async, DOM, ES6+, and more.
🎨
CSS
Complete CSS reference — selectors, box model, positioning, typography, animations, media queries, custom properties, and more.
📄
HTML
Complete HTML reference — document structure, text content, forms, media, semantic elements, accessibility, and more.
Java
Complete Java reference — data types, strings, collections, OOP, interfaces, exceptions, file I/O, streams, lambdas, and more.
💻
Bash
Complete Bash reference — variables, strings, arrays, conditionals, loops, functions, file tests, I/O redirection, process management, and more.
🦀
Rust
Comprehensive Rust language cheat sheet covering ownership, traits, pattern matching, concurrency, and more.
📝
Markdown
Complete Markdown syntax reference for headings, formatting, links, tables, code blocks, and extensions.
📋
YAML
YAML syntax reference covering scalars, collections, anchors, multi-line strings, and common patterns.
🌐
Curl
Curl command-line reference for HTTP requests, authentication, file transfers, debugging, and common API patterns.
Cron
Cron scheduling reference covering syntax, field values, crontab management, and common schedule patterns.
🖥️
Tmux
Terminal multiplexer for managing multiple sessions, windows, and panes from a single terminal.
🔧
Awk
Powerful text processing language for pattern scanning, data extraction, and report generation.
✂️
Sed
Stream editor for filtering and transforming text, line by line.
🔍
Find
Search for files and directories in a directory hierarchy with powerful filtering options.
🔎
Grep
Search text using patterns. Filter lines from files, command output, or streams with regular expressions.
🐘
PHP
Complete PHP cheat sheet covering syntax, OOP, arrays, PDO, and modern PHP 8.x features.
⚙️
C
Complete C programming cheat sheet covering syntax, pointers, memory management, and standard library.
🔷
C++
Complete C++ cheat sheet covering STL containers, OOP, templates, smart pointers, and modern C++ features.
🐬
MySQL
Complete MySQL cheat sheet covering queries, joins, indexes, transactions, and administration.
💅
Sass
Complete Sass/SCSS cheat sheet covering variables, mixins, functions, nesting, and modern module system.
🔐
Chmod
Linux file permission commands and patterns for chmod.
🔢
NumPy
Essential NumPy commands for array manipulation and numerical computing in Python.
🐼
Pandas
Pandas cheat sheet for data manipulation, analysis, and transformation in Python.
🎯
Dart
Dart language cheat sheet covering syntax, types, OOP, null safety, and async patterns.
🔺
Laravel
Laravel PHP framework cheat sheet for routing, Eloquent, Blade, Artisan, and more.
🟩
Node.js
Comprehensive Node.js runtime reference covering modules, file system, HTTP, streams, and more.
Next.js
Next.js App Router reference covering routing, data fetching, server components, and deployment.
🍃
MongoDB
MongoDB reference covering CRUD operations, aggregation, indexes, and administration.
🔥
Firebase
Firebase reference covering Authentication, Firestore, Realtime Database, Cloud Functions, and Hosting.
🐳
Docker Compose
Docker Compose reference covering CLI commands, service configuration, networking, volumes, and more.
💲
jQuery
Quick reference for jQuery selectors, DOM manipulation, events, AJAX, and more.
📐
LaTeX
Quick reference for LaTeX document structure, math mode, formatting, and common packages.
🎯
XPath
Quick reference for XPath expressions, axes, predicates, and functions for XML/HTML querying.
Emmet
Quick reference for Emmet abbreviations for lightning-fast HTML and CSS coding.
📦
TOML
Quick reference for TOML configuration file syntax, types, tables, and common patterns.
💎
Prisma
Complete Prisma ORM cheat sheet — schema, queries, migrations, and CLI.
🤖
GitHub Actions
Complete GitHub Actions cheat sheet — workflows, triggers, jobs, and CI/CD patterns.
📦
npm
Complete npm cheat sheet — package management, scripts, publishing, and configuration.
Supabase
Complete Supabase cheat sheet — auth, database, realtime, storage, and edge functions.
🪶
Apache
Complete Apache HTTP Server cheat sheet — virtual hosts, modules, rewrite rules, and SSL.
📡
HTTP Status Codes
Complete reference of all standard HTTP response status codes with descriptions and use cases.
🔤
ASCII Table
Complete ASCII character reference with decimal, hexadecimal, and character values.
🔧
Chrome DevTools
Essential Chrome DevTools shortcuts, commands, and workflows for web developers.
💧
Drizzle ORM
Complete Drizzle ORM reference for schema definition, queries, relations, migrations, and common patterns.
Vercel CLI
Complete Vercel CLI reference for deployment, project management, domains, environment variables, and configuration.
🔄
PM2
Production process manager for Node.js applications with built-in load balancer, monitoring, and zero-downtime reloads.
📺
Screen
GNU Screen terminal multiplexer for persistent sessions, window management, and remote work.
📦
Webpack
Module bundler for JavaScript applications — loaders, plugins, code splitting, optimization, and dev server.
Vite
Next-generation frontend build tool with instant HMR, native ES modules, and optimized production builds via Rollup.

📖 Free, searchable command reference. Bookmark this page for quick access.