Registry / web-framework / renderkid

renderkid

JSON →
library3.0.0jsnpmunverified

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 renderkid
INSTALL
IMPORT
SIG · RENDERKID
R
renderkid
web-frameworkjavascriptv3.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RenderKid
import RenderKid from 'renderkid'
const RenderKid = require('renderkid')
The README examples show CommonJS `require`, but for modern Node.js ESM projects, use the `import` statement. The library ships as CommonJS, so direct ESM import might require bundler configuration or be used via interop.
RenderKid
const RenderKid = require('renderkid')
For CommonJS environments (typical for older Node.js projects), use `require`.

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.

import RenderKid from 'renderkid'; const r = new RenderKid(); r.style({ "ul": { display: "block", margin: "2 0 2" }, "li": { display: "block", marginBottom: "1" }, "key": { color: "grey", marginRight: "1" }, "value": { color: "bright-white" } }); const output = r.render(` <ul> <li> <key>Name:</key> <value>RenderKid</value> </li> <li> <key>Version:</key> <value>3.0.0</value> </li> <li> <key>Last Update (docs):</key> <value>Jan 2015</value> </li> </ul> `); console.log(output);
Debug
Known issues
gotchaRenderKid uses a custom HTML/CSS parsing engine, meaning only a specific subset of HTML tags and CSS properties are supported. It is not a full browser engine, so standard web debugging tools or expectations will not apply. Refer to the documentation for supported styles.
fix
Consult the RenderKid documentation carefully for the list of supported HTML tags and CSS properties. Do not assume full browser CSS/HTML compatibility.
affects: >=1.0
gotchaThe documentation and examples frequently use CoffeeScript syntax (e.g., lack of commas in object literals, implicit returns). When converting to JavaScript or TypeScript, ensure correct syntax for object literals (commas between properties) and explicit return statements if necessary.
fix
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.
affects: >=1.0
deprecatedThe project appears to be in maintenance mode, with no significant updates since 2015 based on the provided README. While functional, it might not be actively maintained for new Node.js versions, security patches, or feature requests. Consider alternatives for newer projects requiring active support.
fix
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.
affects: >=3.0
Errors
Common errors & fixes
SyntaxError: Unexpected token ':'
Missing commas in JavaScript object literals when porting CoffeeScript examples.
fix
Ensure all properties in style objects are separated by commas: `color: 'grey', marginRight: '1'`.
TypeError: r.render is not a function
`RenderKid` instance not properly initialized or incorrect method call.
fix
Make sure you call `new RenderKid()` to create an instance before calling `.render()` or `.style()` methods: `const r = new RenderKid();`.
CSS property 'xyz' not supported
Attempting to use a CSS property that is not implemented by RenderKid's custom rendering engine.
fix
Consult the RenderKid documentation for a complete list of supported CSS properties. Avoid properties common in browsers that are not explicitly listed.
Upgrade
Version history
3.0.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
renderkid — npm install renderkid · libregistry