FitText makes font-sizes flexible. Use this plugin on your fluid or responsive layout to achieve scalable headlines that fill the width of a parent element. Oh, and don't you dare let us catch you using FitText on paragraph text. This is for gigantic display text only! Your text should now fluidly resize, by default: Font-size = 1/10th of the element's width. If your text is resizing poorly, you'll want to turn tweak up/down "The Compressor". It works a little like a guitar amp. The default is 1. This will hopefully give you a level of "control" that might not be pixel perfect, but resizes smoothly & nicely. FitText now allows you to specify two optional pixel values: minFontSize and maxFontSize. Great for situations when you want to preserve hierarchy. Run FitText before anything that hides the element you're trying to size (e.g. before Carousels, Scrollers, Accordions, Tabs, etc). Hiding an element's container removes its width. It can't resize without a width.

Features

  • FitText makes font-sizes flexible
  • Tweak until you like it
  • Set a No-JS fallback font-size in your CSS
  • Supported in all major browsers
  • minFontSize & maxFontSize
  • Ratio-based resizing of your headlines

Project Samples

Project Activity

See All Activity >

Follow FitText.js

FitText.js Web Site

You Might Also Like
Passwordless authentication enables a secure and frictionless experience for your users | Auth0 Icon
Over two-thirds of people reuse passwords across sites, resulting in an increasingly insecure e-commerce ecosystem. Learn how passwordless can not only mitigate these issues but make the authentication experience delightful. Implement Auth0 in any application in just five minutes
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of FitText.js!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Text Editors, JavaScript Browser Extensions and Plugins

Registered

2021-08-16