
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
react-blessed-contrib
Advanced tools
A wrapper for blessed-contrib widgets to be rendered with react-blessed.
A wrapper for blessed-contrib widgets to be rendered with react-blessed.
You can install react-blessed-contrib through npm:
npm install react@0.14.0 blessed react-blessed
npm install react-blessed-contrib
For a quick demo you can clone this repository and check some of the examples:
git clone https://github.com/dundalek/react-blessed-contrib
cd react-blessed-contrib
npm install
# Some examples (code is in `examples/`)
npm run dashboard
npm run charts
npm run basic
Import components and render with React. You can mix them with native react-blessed components. Most components can be used directly as shown in the example. Refer to following sections to see how to use layout components like Grid and Carousel.
import React, { Component } from 'react';
import blessed from 'blessed';
import { render } from 'react-blessed';
import { Bar } from 'react-blessed-contrib';
// Rendering a simple centered box with a bar chart
class App extends Component {
render() {
return (
<box top="center"
left="center"
width="80%"
height="80%"
border={{type: 'line'}}
style={{border: {fg: 'blue'}}}>
<Bar
label="Server Utilization (%)"
barWidth={4}
barSpacing={6}
xOffset={0}
maxHeight={9}
data={{
titles: ['bar1', 'bar2'],
data: [5, 10]
}}
/>
</box>
);
}
}
// Creating our screen
const screen = blessed.screen();
// Rendering the React app using our screen
const component = render(<App />, screen);
Pass in children components to use a grid layout:
import { Grid, Map } from 'react-blessed-contrib';
<Grid rows={12} cols={12}>
<Map row={0} col={0} rowSpan={4} colSpan={4} label="World Map" />
<box row={4} col={4} rowSpan={4} colSpan={4}>My Box</box>
</Grid>
In case there would be name conflicts with props (row, col, rowSpan, colSpan), you can use alternative notation:
import { Grid, GridItem, Map } from 'react-blessed-contrib';
<Grid rows={12} cols={12}>
<GridItem row={0} col={0} rowSpan={4} colSpan={4} component={Map} options={{label: 'World Map'}} />
<GridItem row={4} col={4} rowSpan={4} colSpan={4} component={'box'} options={{content: 'My Box'}} />
</Grid>
Pass in subcomponents as children. Refer to examples/carousel.js for full example.
import { Carousel } from 'react-blessed-contrib';
<Carousel interval={3000} controlKeys={true} screen={screen}>
<Page1 />
<Page2 />
</Carousel>
Say you have a custom blessed widget:
const widget = myBlessedWidget();
screen.append(widget);
You can wrap it in a component and use like:
import React from 'react';
import { render } from 'react-blessed';
import { createBlessedComponent } = 'react-blessed-contrib';
const MyBlessedWidget = createBlessedComponent(myBlessedWidget);
render(<MyBlessedWidget />, screen);
MIT
Useful resources for learning more about React internals:
FAQs
A wrapper for blessed-contrib widgets to be rendered with react-blessed.
The npm package react-blessed-contrib receives a total of 9 weekly downloads. As such, react-blessed-contrib popularity was classified as not popular.
We found that react-blessed-contrib demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.