baselinenewly| Class | CSS |
|---|---|
| tw:b | text-wrap: balance; |
| tw:n | text-wrap: nowrap; |
| tw:p | text-wrap: pretty; |
| tw:w | text-wrap: wrap; |
Variants
Prefix any class with a variant to apply it only under that condition. Variants stack, as in @md:h:tw:p.
Breakpoints
Apply a class from a viewport width up. Each breakpoint covers its width & every width above it.
| @xs:tw:p | From 32rem up. |
| @sm:tw:p | From 40rem up. |
| @md:tw:p | From 48rem up. |
| @lg:tw:p | From 64rem up. |
| @xl:tw:p | From 80rem up. |
| @xxl:tw:p | From 96rem up. |
Containers
Apply a class from a container's width up, not the viewport's. Mark the parent with ct:is first.
| @c:xs:tw:p | Container from 32rem up. |
| @c:sm:tw:p | Container from 40rem up. |
| @c:md:tw:p | Container from 48rem up. |
| @c:lg:tw:p | Container from 64rem up. |
| @c:xl:tw:p | Container from 80rem up. |
| @c:xxl:tw:p | Container from 96rem up. |
Media
Apply a class when the device or the page matches a condition, or on the first frame an element renders.
| @pc:tw:p | On a touch screen. |
| @prm:tw:p | With reduced motion on. |
| @st:tw:p | On the first frame. |
States
Apply a class only while the element is in a state, such as hovered, focused or checked.
| h:tw:p | On :hover. |
| f:tw:p | On :focus. |
| fv:tw:p | On :focus-visible. |
| a:tw:p | On :active. |
| d:tw:p | On :disabled. |
| fc:tw:p | On :first-child. |
| c:tw:p | On :checked. |
| e:tw:p | On :empty. |
| fw:tw:p | On :focus-within. |
| i:tw:p | On :invalid. |
| in:tw:p | On :indeterminate. |
| lc:tw:p | On :last-child. |
| nc:tw:p | On :nth-child. |
| r:tw:p | On :required. |
| ro:tw:p | On :read-only. |
| v:tw:p | On :valid. |
Pseudo Elements
Style a part of the element rather than the element itself, such as its placeholder or the selected text.
| a::tw:p | On ::after. |
| b::tw:p | On ::before. |
| p::tw:p | On ::placeholder. |
| s::tw:p | On ::selection. |