chalk-extra
v0.1.2
Published
Een uitbreiding op chalk
Readme
Chalk Extra
Chalk Extra is an enhanced version of the popular chalk library, providing additional predefined styles, gradients, ASCII art, animations, and spinners to make your terminal output more vibrant and expressive.
Features
- Predefined Styles: A variety of text styles, including rainbow, zebra, trap, and neon colors.
- Gradients: Use the
gradient-stringlibrary to create stunning text gradients. - ASCII Art: Generate ASCII art using the
figletlibrary. - Animations: Add text animations with
chalk-animation. - Spinners: Display terminal spinners using the
oralibrary. - Custom Styles: Easily add your own custom styles.
Installation
Install Chalk Extra via npm:
npm install chalk-extraUsage
Import Chalk Extra into your project and start using its features:
import chalk from 'chalk-extra';
// Predefined styles
console.log(chalk.rainbow('Rainbow Text'));
console.log(chalk.neonGreen('Neon Green Text'));
// Gradients
console.log(chalk.gradient('red', 'blue')('Gradient Text'));
// ASCII Art
console.log(chalk.ascii('Hello', { font: 'Ghost' }));
// Animations
const animation = chalk.animate.rainbow('Animating...');
setTimeout(() => animation.stop(), 3000);
// Spinners
const spinner = chalk.spinner('Loading...').start();
setTimeout(() => spinner.succeed('Done!'), 2000);Adding Custom Styles
You can add your own custom styles using the addStyle method:
chalk.addStyle('customStyle', (text) => chalk.rgb(50, 100, 50)(text));
console.log(chalk.customStyle('Custom Style'));License
This project is licensed under the MIT License.
