Font Weight
Utilities for controlling the font weight of an element.
Default class reference
| Class | Properties |
|---|---|
| font-thin | font-weight: 100; |
| font-extralight | font-weight: 200; |
| font-light | font-weight: 300; |
| font-normal | font-weight: 400; |
| font-medium | font-weight: 500; |
| font-semibold | font-weight: 600; |
| font-bold | font-weight: 700; |
| font-extrabold | font-weight: 800; |
| font-black | font-weight: 900; |
Usage
Control the font weight of an element using the font-{weight} utilities.

1. <p class="font-thin ...">The quick brown fox ...</p>
2. <p class="font-extralight ...">The quick brown fox ...</p>
3. <p class="font-light ...">The quick brown fox ...</p>
4. <p class="font-normal ...">The quick brown fox ...</p>
5. <p class="font-medium ...">The quick brown fox ...</p>
6. <p class="font-semibold ...">The quick brown fox ...</p>
7. <p class="font-bold ...">The quick brown fox ...</p>
8. <p class="font-extrabold ...">The quick brown fox ...</p>
9. <p class="font-black ...">The quick brown fox ...</p>
Responsive
To control the font weight of an element at a specific breakpoint, add a {screen}: prefix to any existing font weight utility. For example, use md:font-bold to apply the font-bold utility at only medium screen sizes and above.
1. <p class="font-normal md:font-bold ...">The quick brown fox jumps over the lazy dog.</p>
For more information about Tailwind’s responsive design features, check out the Responsive Design documentation.
Customizing
Font Weights
By default, Tailwind provides 10 font-weight utilities. You change, add, or remove these by editing the theme.fontWeight section of your Tailwind config.
1. // tailwind.config.js
2. module.exports = {
3. theme: {
4. fontWeight: {
5. - hairline: 100,
6. + 'extra-light': 100,
7. - thin: 200,
8. light: 300,
9. normal: 400,
10. medium: 500,
11. - semibold: 600,
12. bold: 700,
13. - extrabold: 800,
14. + 'extra-bold': 800,
15. black: 900,
16. }
17. }
18. }
Variants
By default, only responsive variants are generated for font weight utilities.
You can control which variants are generated for the font weight utilities by modifying the fontWeight property in the variants section of your tailwind.config.js file.
For example, this config will also generate hover and focus variants:
1. // tailwind.config.js
2. module.exports = {
3. variants: {
4. extend: {
5. // ...
6. + fontWeight: ['hover', 'focus'],
7. }
8. }
9. }
Disabling
If you don’t plan to use the font weight utilities in your project, you can disable them entirely by setting the fontWeight property to false in the corePlugins section of your config file:
1. // tailwind.config.js
2. module.exports = {
3. corePlugins: {
4. // ...
5. + fontWeight: false,
6. }
7. }
