Gathering detailed insights and metrics for react-simple-typewriter-vb
Gathering detailed insights and metrics for react-simple-typewriter-vb
Gathering detailed insights and metrics for react-simple-typewriter-vb
Gathering detailed insights and metrics for react-simple-typewriter-vb
npm install react-simple-typewriter-vb
Typescript
Module System
Node Version
NPM Version
62.7
Supply Chain
91.7
Quality
78.9
Maintenance
100
Vulnerability
100
License
Total Downloads
425
Last Day
1
Last Week
1
Last Month
3
Last Year
425
Minified
Minified + Gzipped
Latest Version
1.1.0
Package Id
react-simple-typewriter-vb@1.1.0
Unpacked Size
27.74 kB
Size
6.57 kB
File Count
8
NPM Version
11.0.0
Node Version
22.11.0
Published on
Jan 29, 2025
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
0%
1
Compared to previous week
Last Month
-75%
3
Compared to previous month
Last Year
0%
425
Compared to previous year
A lightweight React package to create a typewriter effect effortlessly. Perfect for adding dynamic and engaging text animations to your projects.
Install the package using npm:
1npm install react-simple-typewriter-vb
Or using yarn:
1yarn add react-simple-typewriter-vb
Here's how to use the TypeWriter
component in your React project:
1import React from 'react'; 2import { TypeWriter } from 'react-simple-typewriter-vb'; 3 4const App = () => { 5 return ( 6 <TypeWriter 7 options={{ 8 strings: ['Hello, World!', 'Welcome to React Simple Typewriter!'], 9 speed: 100, // Typing speed in ms (default: 50) 10 pause: 2000, // Pause duration in ms before rotating to the next string (default: 1000) 11 }} 12 /> 13 ); 14}; 15 16export default App;
Prop | Type | Default | Description |
---|---|---|---|
options | Object | N/A | Options to configure the typewriter behavior. |
Option | Type | Default | Description |
---|---|---|---|
strings | string[] | [] | Array of strings to type. |
speed | number | 50 | Typing speed in milliseconds. |
deleteSpeed | number | 30 | Deleting speed in milliseconds. |
pause | number | 1000 | Pause duration in milliseconds between strings. |
loop | boolean | true | Whether to loop through the strings continuously. |
1import React from 'react'; 2import { TypeWriter } from 'react-simple-typewriter-vb'; 3 4const Example = () => ( 5 <TypeWriter 6 options={{ 7 strings: ['React is awesome!', 'Try this typewriter effect!'], 8 speed: 75, 9 pause: 1500, 10 loop: false, 11 deleteSpeed: 90, 12 }} 13 /> 14); 15 16export default Example;
You can customize the appearance of the TypeWriter component by wrapping it with your own styled component:
1import React from 'react'; 2import { TypeWriter } from 'react-simple-typewriter-vb'; 3 4const StyledExample = () => ( 5 <div style={{ 6 fontFamily: 'monospace', 7 fontSize: '2em', 8 color: '#333', 9 padding: '20px' 10 }}> 11 <TypeWriter 12 options={{ 13 strings: ['Custom styled typewriter!', 'Make it your own!'], 14 speed: 75, 15 pause: 1500, 16 }} 17 /> 18 </div> 19);
The component is fully compatible with Next.js, including server-side rendering:
1// pages/index.tsx 2import { TypeWriter } from 'react-simple-typewriter-vb'; 3 4export default function Home() { 5 return ( 6 <main> 7 <h1> 8 <TypeWriter 9 options={{ 10 strings: ['Welcome to Next.js!', 'Built with TypeWriter'], 11 speed: 50, 12 loop: true, 13 }} 14 /> 15 </h1> 16 </main> 17 ); 18}
The package includes TypeScript definitions out of the box:
1import { TypeWriter, TypewriterProps } from 'react-simple-typewriter-vb'; 2 3const options: TypewriterProps['options'] = { 4 strings: ['TypeScript Support!', 'Full type safety!'], 5 speed: 50, 6 pause: 1000, 7 loop: true, 8}; 9 10const TypeScriptExample = () => ( 11 <TypeWriter options={options} /> 12);
If you'd like to contribute or modify the package locally:
Clone the repository:
1git clone https://github.com/vito8916/react-simple-typewriter.git
Install dependencies:
1npm install
Build the package:
1npm run build
Link the package locally for testing:
1npm link
Test the package in a local project:
1npm link react-simple-typewriter-vb
This project is licensed under the MIT License.
Made with ❤️ by Victor Alvarado (https://github.com/vito8916).
No vulnerabilities found.
No security vulnerabilities found.