Break Before - Tailwind CSS
Tailwind CSS home page Introducing Catalyst A modern application UI kit for React Theme Tailwind CSS on GitHub Layout Break Before Tailwind CSS v4.0 is here → Learn more in the upgrade guide. Quick reference Class Properties break-before-auto break-before : auto ; break-before-avoid break-before : avoid ; break-before-all break-before : all ; break-before-avoid-page break-before : avoid-page ; break-before-page break-before : page ; break-before-left break-before : left ; break-before-right break-before : right ; break-before-column break-before : column ; Basic usage Setting the break-before behavior Use the break-before-* utilities to control how a column or page break should behave before an element.
For example, use the break-before-column utility to force a column break before an element. < div class = " columns-2 " > < p > Well, let me tell you something, ... </ p > < p class = " break-before-column " > Sure, go ahead, laugh... </ p > < p > Maybe we can live without... </ p > < p > Look. If you think this is... </ p > </ div > Applying conditionally Hover, focus, and other states Tailwind lets you conditionally apply utility classes in different states using variant modifiers.
For example, use hover : break-before-column to only apply the break-before-column utility on hover . < div class = " hover:break-before-column " > <!-- ... --> </ div > For a complete list of all available state modifiers, check out the Hover, Focus, & Other States documentation. Breakpoints and media queries You can also use variant modifiers to target media queries like responsive breakpoints, dark mode, prefers-reduced-motion, and more.
For example, use md: break-before-column to apply the break-before-column utility at only medium screen sizes and above. < div class = " md:break-before-column " > <!-- ... --> </ div > To learn more, check out the documentation on Responsive Design , Dark Mode and other media query modifiers . On this page Quick reference Basic usage Setting the break-before behavior Applying conditionally Hover, focus, and other states Breakpoints and media queries From the creators of Tailwind CSS Make your ideas look awesome, without relying on a designer.
“This is the survival kit I wish I had when I started building apps.” Derrick Reimer, SavvyCal