
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-chess-pieces
Advanced tools
Just a little np module to give you react svg chess pieces
do with them what you please!
$ npm i -S react-chess-pieces
OR
$ yarn add react-chess-pieces
then (eg in a created react app)
we can use the default export (a Component called Piece)
import React, { Component } from 'react';
import './App.css';
import Piece from 'react-chess-pieces';
const initialPosition = [
["R", "N", "B", "Q", "K", "B", "N", "R"],
["P", "P", "P", "P", "P", "P", "P", "P"],
["", "", "", "", "", "", "", ""],
["", "", "", "", "", "", "", ""],
["", "", "", "", "", "", "", ""],
["", "", "", "", "", "", "", ""],
["p", "p", "p", "p", "p", "p", "p", "p"],
["r", "n", "b", "q", "k", "b", "n", "r"]
];
class App extends Component {
state = {
pieces: initialPosition,
}
render() {
return (
<div className="App">
<div className='Board'>
{this.state.pieces.map((rowOfPieces, rowIndex)=> (
<div key={rowIndex+'row'} className='Row'>
{rowOfPieces.map( (piece, colIndex)=> (
<div key={rowIndex+'row'+colIndex+'col'} className='Square'>
<Piece piece={piece}/>
</div>
))}
</div>
))}
</div>
</div>
);
}
}
export default App;
the Piece Component renders into an unstyled svg, so you should be able to style it however you please
all svg are available by direct import as well via /dist/svg-index
this example is missing all the CSS - if you want to learn how to build a chessboard in react checkout my workshop here
original sprite svg:
https://commons.wikimedia.org/wiki/File:Chess_Pieces_Sprite.svg
I have edited them lightly for cultural reasons
originally licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license, which I think is okay to republish as ISC.
FAQs
svg chess pieces
We found that react-chess-pieces 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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.