text-2xl Tailwind CSS Class
2x large. The generated CSS output is font-size: 1.5rem. This page gives you the generated CSS output, a copy-paste example, and an interactive demo for search-friendly utility lookups.
text-2xl maps to font-size: 1.5rem. It belongs to the Typography category and was generated from Tailwind CSS v4.1.14 reference data.
Interactive Demo
Toggle the utility on and off, switch preview surfaces, and adjust the demo content to see how this class behaves.
Tailwind utility preview
Interactive text preview for this utility class.
This preview simulates the effect of text-2xl using structured data generated from your Tailwind reference snapshot.
Visual Comparison
text-2xl changes the text presentation through font-size: 1.5rem, which directly affects hierarchy and scan speed.
Tailwind utility preview
Live utility preview
Tailwind utility preview
Live utility preview
Variants & Breakpoints
Use the base utility directly, then layer state or responsive variants when the component needs more specific behavior.
| Context | Class syntax | Why use it | Preview |
|---|---|---|---|
| Base | text-2xl | Apply text-2xl directly to the element. | Aa |
| sm | sm:text-2xl | Applies from 640px and up. | Aa |
| md | md:text-2xl | Applies from 768px and up. | Aa |
| lg | lg:text-2xl | Applies from 1024px and up. | Aa |
Utility Family Comparison
Compare nearby options and related companions so you can choose the right intensity before reaching for trial-and-error tweaks.
Sample text
Preview
Sample text
Preview
Sample text
Preview
When to use this class
Use it to make type hierarchy intentional in headings, labels, supporting copy, and dense interface text where readability matters.
Watch out for
Do not treat typography utilities as isolated decoration. Size, weight, line height, and alignment usually need to work together to feel balanced.
Class Reference
| Field | Value |
|---|---|
| Utility class | text-2xl |
| Category | Typography |
| CSS output | font-size: 1.5rem |
| Source page | Cheat Sheet |
| Static slug | text-2xl |
Example Snippet
Use this code snippet as a starting point, then swap the markup around it to fit your component or layout.
<p class="text-2xl">Typography preview text</p>Related Utility Pages
Browse More
Return to the Cheat Sheet page for broader browsing, or open the Tailwind CSS Cheat Sheet to move across categories quickly.