blessed-tab-container is a specialized UI component designed for the `blessed` command-line interface (CLI) library, enabling developers to create multi-tabbed user interfaces within terminal applications. As of version `1.0.0`, it provides a stable API for managing tabbed content. The package indicates tab 'dirty' states, a key differentiator, by modifying tab labels, along with configurable styling options for active and dirty tabs. Released over 6 years ago, it suggests a mature and stable API without a rapid release cadence. It extends `blessed` functionality by integrating tab navigation directly into the `blessed` screen's label mechanism, offering a unique approach compared to other potential custom container implementations.
npm install blessed-tab-containerVerified import paths — ran on the pinned version, not inferred.
This example demonstrates setting up two `blessed-tab-container` instances within a `blessed-contrib` grid, populating them with simple `blessed.element` components, and programmatically setting the visible tab. It shows basic initialization and interaction.
Always use `require()` for importing `blessed-tab-container` and other `blessed` related modules in projects not explicitly set up for CJS-to-ESM interoperability.
Consider using `reblessed` (a community-maintained fork of `blessed`) if active development and modern Node.js compatibility are critical, though `blessed-tab-container` might need testing for `reblessed` compatibility.
Thoroughly test integration in modern Node.js environments. Review dependency tree for known vulnerabilities in older packages if used in production. Be prepared to fork or extend if new features are required.
Ensure your file is treated as CommonJS (e.g., `.js` file without `type: 'module'` in `package.json`). For `blessed-tab-container@1.0.0`, direct ESM imports are not supported. Stick to CommonJS `require()`.
If using CommonJS, ensure `const BlessedTabContainer = require('blessed-tab-container')` is used. If attempting ESM with a bundler, ensure it handles default CJS exports correctly, e.g., `import BlessedTabContainer from 'blessed-tab-container'` after appropriate transpilation/bundling.