RenderKid is a Node.js library that enables developers to style command-line interface (CLI) output using a subset of HTML and CSS. It allows for rich text formatting, layout control (margins, padding, width, height, display modes), and custom colors directly in the terminal. The current stable version is 3.0.0. While powerful for its time, the project appears to be in maintenance mode, with its last significant update indicated in January 2015 in the provided README. It differentiates itself by adopting a web-like styling paradigm, offering more expressive layout control than simpler chalk-like libraries, and abstracting away ANSI escape codes behind a familiar CSS-in-JS syntax for console elements.
npm install renderkidVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to initialize RenderKid, define styles using a CSS-like object for custom HTML tags, and then render a string containing these tags to produce styled console output.
Consult the RenderKid documentation carefully for the list of supported HTML tags and CSS properties. Do not assume full browser CSS/HTML compatibility.
Always use standard JavaScript/TypeScript syntax for object literals, including commas after each property. Pay attention to block scopes and explicit returns if porting CoffeeScript examples.
For new projects, evaluate more actively maintained libraries like 'chalk', 'kleur', or 'picocolors' for basic styling, or 'ink'/'blessed' for more complex TUI applications. If using RenderKid, thoroughly test its compatibility with your current Node.js runtime and dependencies.
Ensure all properties in style objects are separated by commas: `color: 'grey', marginRight: '1'`.
Make sure you call `new RenderKid()` to create an instance before calling `.render()` or `.style()` methods: `const r = new RenderKid();`.
Consult the RenderKid documentation for a complete list of supported CSS properties. Avoid properties common in browsers that are not explicitly listed.
No dependency data recorded yet.