Google Keeper-like Auto Text Resize Plugin For jQuery - textboxfit.js
| File Size: | 6.86 KB |
|---|---|
| Views Total: | 842 |
| Last Update: | |
| Publish Date: | |
| Official Website: | Go to website |
| License: | MIT |
textboxfit.js is a lightweight jQuery plugin that automatically & dynamically adjusts the size of your text to fill fixed size container, as you seen on Google Keeper app.
How to use it:
1. Load the jQuery textboxfit.js script after jQuery JavaScript library.
<script src="jquery.min.js"></script> <script src="src/textboxfit.js"></script>
2. Wrap your text into a container.
<div class="box">Text here</div>
3. Set CSS width & min-height to the container.
.box {
width:300px;
padding: 10px;
min-height: 200px;
}
4. Call the plugin on the container and set the maximum & minimum text size.
$('.box').textboxfit({
minFontSize: 14,
maxFontSize: 64
});
This awesome jQuery plugin is developed by janstuemmel. For more Advanced Usages, please check the demo page or visit the official website.











