
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
js-type-text
Advanced tools
A lightweight & fun typing animation built with vanilla JavaScript. Framework agnostic so it works with Vue.js, React, and everything else.
A framework agnostic typing animation package built with vanilla JavaScript. Works with Vue.js, React, and everything else.
This animation works with any font! However you will find that it looks its best when paired with Monospaced fonts as their letters have a fixed width.
npm install js-type-text
// import the package
import jsTypeText from 'js-type-text';
// start typing
jsTypeText.start(config, callback);
// stop typing and/or cursor.
jsTypeText.stop();
jsTypeText.start({
text: "Your Text Here",
speed: 110,
cursor: true,
cursorSpeed: 350,
cursorStyle: "vertical"
}, callback);
Value | Type | Required | Description | Default |
---|---|---|---|---|
text | String | Required | The string to be typed. | N/A |
speed | Number | Optional | Time in ms per character typed. | 110 |
cursor | Boolean | Optional | Show or hide cursor | TRUE |
cursorSpeed | Number | Optional | Time in ms per cursor blink. Set to 0 to disable blink. | 350 |
cursorStyle | String | Optional | "vertical" or "horizontal" or any html character you'd like. For example "▗" . | "horizontal" (ie. the underscore symbol _ ) |
Note: Avoid jitter with custom HTML cursors by setting a CSS line-height
value.
jsTypeText.start({
text: "Welcome to my site"
}, function (result) {
document.getElementById('myElement').innerHTML = result;
});
// optionally stop the typing and/or cursorpoint.
jsTypeText.stop();
data() {
return: {
myTitle: ''
}
},
created: function () {
jsTypeText.start({
text: "Welcome to my site"
}, (result) => {
this.myTitle = result;
})
},
beforeDestroy: function () {
jsTypeText.stop();
}
class myPage extends React.Component{
state = {
myTitle:""
}
componentDidMount () {
jsTypeText.start({
text: "Welcome to my site"
}, (result) => {
this.setState({myTitle: result})
}
}
componentWillUnmount () {
jsTypeText.stop()
}
render(){
return(<h1>{this.state.myTitle}</h1>)
}
}
SIC © Jared Krause
FAQs
A lightweight & fun typing animation built with vanilla JavaScript. Framework agnostic so it works with Vue.js, React, and everything else.
The npm package js-type-text receives a total of 3 weekly downloads. As such, js-type-text popularity was classified as not popular.
We found that js-type-text demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.