Chalk 5 is ESM. If you want to use Chalk with TypeScript or a build tool, you will probably want to use Chalk 4 for now. Chalk comes with an easy to use composable API where you just chain and nest the styles you want. Chain styles and call the last one as a method with a string argument. Order doesn't matter, and later styles take precedent in case of a conflict. This simply means that chalk.red.yellow.green is equivalent to chalk.green. Color support is automatically detected, but you can override it by setting the level property. You should however only do this in your own code as it applies globally to all Chalk consumers. Detect whether the terminal supports color. Used internally and handled for you, but exposed for convenience. chalkStderr contains a separate instance configured with color support detected for stderr stream instead of stdout. Override rules from supportsColor apply to this too. supportsColorStderr is exposed for convenience.

Features

  • Expressive API
  • Highly performant
  • No dependencies
  • Ability to nest styles
  • Auto-detects color support
  • 256/Truecolor color support

Project Samples

Project Activity

See All Activity >

Categories

Terminals, Design

License

MIT License

Follow Chalk

Chalk Web Site

Other Useful Business Software
Next-Gen Encryption for Post-Quantum Security | CLEAR by Quantum Knight Icon
Next-Gen Encryption for Post-Quantum Security | CLEAR by Quantum Knight

Lock Down Any Resource, Anywhere, Anytime

CLEAR by Quantum Knight is a FIPS-140-3 validated encryption SDK engineered for enterprises requiring top-tier security. Offering robust post-quantum cryptography, CLEAR secures files, streaming media, databases, and networks with ease across over 30 modern platforms. Its compact design, smaller than a single smartphone image, ensures maximum efficiency and low energy consumption.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Chalk!

Additional Project Details

Operating Systems

Windows

Programming Language

JavaScript

Related Categories

JavaScript Terminals, JavaScript Design Software

Registered

2022-05-11