fresh-typedjs
Version:
My library lets you input text (a word or a paragraph) and specify a timing to animate writing or deleting each letter one by one,
169 lines (121 loc) âĒ 4.54 kB
Markdown
# ðŊ Fresh Typed.js v1.0.9
A lightweight and responsive **JavaScript typing animation library** that types text character by character or word by word, supports custom speed, and loops infinitely.
Perfect for enhancing your websites with dynamic text effects, headers, or interactive messages.
Inspired by popular typing libraries but fully optimized for **performance, simplicity, and responsiveness**. Works seamlessly with **Tailwind CSS** and any frontend framework.
## ð Overview
**Fresh Typed.js** allows developers to create eye-catching typing effects on any text element.
Features include:
- Character-by-character or word-by-word typing
- Infinite loop animations
- Customizable typing speed
- Fully responsive and works across all devices
Use it with **NPM** or **CDN**, and integrate it easily into any project.
## ð Live Demo
ð [View Live Demo](https://parsa-farshah.github.io/Fresh-Typed.JS/)
## âĻ Features
- ⥠Lightweight, dependency-free (Vanilla JS)
- âą Customizable typing speed
- ð Infinite loop typing animation
- ðĨ Fully responsive across desktop, tablet, and mobile
- ðŠķ Works perfectly with Tailwind CSS or custom styles
## ð
Release Date
**October 14, 2025**
## ð ïļ Technologies Used
- **HTML5** â semantic markup
- **CSS3 & Tailwind CSS** â styling and animation
- **JavaScript** â typing logic and loops
- **Media Queries** â ensures responsiveness
ðļ Project Screenshots
ð Overview
<img src="docs/images/typedanimation.png" alt="Project Overview" width="100%">
ðŧ Website View
<img src="docs/images/cover.png" alt="Desktop View" width="100%">
ðĻâðŧ Developed By
[parsa dehghan pour farashah](http://linkedin.com/in/parsa-dehghan-pour-farashah-85ab04250)
## ðĻâðŦ Supervisor
- This project was completed under the guidance of my academic supervisor:
ð [Parsa Ghorbanian's Website](https://trainingsitedesign.ir/)
- thanks to ð [mehrab Pour zakaria's Website](https://pourzakaria.com/) for helping upload to the npm site
## ðē Connect with Me | Ø§ØąØŠØĻاط ØĻا Ų
Ų
- ðļ Instagram: [@parsa_dehghanpour_dv](https://www.instagram.com/parsa_dehghanpour_dv?igsh=eHkwNWhsa3I4ZWVp)
- ðž LinkedIn: [parsa dehghan pour farashah](http://linkedin.com/in/parsa-dehghan-pour-farashah-85ab04250)
- ðŧ GitHub: [parsa-farshah](http://github.com/parsa-farshah)
- ðĐ Email: parsafarashah2002@gmail.com
- ðš YouTube: [@FrontEndFresh](https://youtube.com/@frontendfresh?si=-2WsIYe-KBTUfwyu)
## ðĶ Installation
### ðđ Using NPM
```bash
npm i fresh-typedjs
html
Copy code
<link rel="stylesheet" href="node_modules/fresh-typedjs/dist/freshType.min.css"/>
<script src="node_modules/fresh-typedjs/dist/freshType.min.js"></script>
ðđ Using CDN
html
Copy code
<link rel="stylesheet" href="https://unpkg.com/fresh-typedjs@1.0.9/dist/freshType.min.css">
<script src="https://unpkg.com/fresh-typedjs@1.0.9/dist/freshType.min.js"></script>
âïļ Usage Example
HTML:
html
Copy code
<h5 class="freshType TextparagraphType"></h5>
CSS:
css
Copy code
.anim {
animation: anim 1s forwards infinite alternate;
}
.afterText::after {
content: "";
background-color: rgb(255, 255, 255);
width: 3px;
height: 100%;
position: absolute;
margin-left: 0.375rem;
margin-top: 0.25rem;
animation: anim 0.5s linear infinite;
}
@keyframes anim {
0% { opacity: 0; }
100% { opacity: 100; }
}
JS:
javascript
Copy code
let paragraph = "parsa the perfect \n front end developer";
const TimeSpeed = 100;
let freshType = document.querySelectorAll(".freshType");
freshType.forEach((item) => {
item.classList.add("relative");
item.classList.add("afterText");
item.style.whiteSpace = "pre";
});
let TextparagraphType = document.querySelector(".TextparagraphType");
let flagParagraph = 0;
let flagBooleanParagraph = true;
setInterval(() => {
if (flagBooleanParagraph) {
TextparagraphType.innerText += paragraph[flagParagraph++];
if (flagParagraph == paragraph.length) {
flagBooleanParagraph = false;
}
} else {
flagParagraph--;
TextparagraphType.innerText = paragraph.slice(0, flagParagraph);
if (flagParagraph === 0) {
flagBooleanParagraph = true;
TextparagraphType.innerText = "";
}
}
}, TimeSpeed);
ð·ïļ License
Released under the MIT License
```