Breakpoint System
Tailwind includes five responsive breakpoints by default, inspired by common device resolutions:These breakpoints use the modern
width >= syntax instead of the older min-width: syntax, providing cleaner and more intuitive media queries.Mobile-First Approach
Every utility in Tailwind can be applied conditionally at different breakpoints. By default, unprefixed utilities apply to all screen sizes, while prefixed utilities only apply at the specified breakpoint and above.How Breakpoints Work
Under the hood, Tailwind generates CSS media queries for each breakpoint variant:Common Responsive Patterns
Responsive Layout
- Grid
- Flexbox
- Container
Responsive Typography
Responsive Spacing
Show/Hide Elements
Max-Width Breakpoints
While mobile-first is recommended, you can also usemax variants to target smaller screens:
max variant generates media queries using width <:
Arbitrary Breakpoints
Use arbitrary values to create one-off breakpoints:Responsive with Other Variants
Breakpoints can be combined with other variants like hover, focus, and dark mode:Container Queries
Tailwind also supports container queries using the@ variant:
Orientation
Target landscape and portrait orientations:Print Styles
Style elements for print media:Customizing Breakpoints
Define custom breakpoints in your theme configuration:xs: and 3xl: variants throughout your HTML:
Breakpoints are sorted automatically by their pixel values, so you don’t need to worry about the order you define them in.