
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
react-seatmap
Advanced tools
A React component to display a minimal, yet functional seatmap.

Two versions are available. The default one can be installed via npm install react-seatmap and you will need to attach a stylesheet to see a decent seatmap. You can find a sample one in main.css.
import React from 'react';
import Seatmap from 'react-seatmap';
React.render(
<Seatmap rows={rows} maxReservableSeats={3} alpha />,
document.getElementById('app')
);
There is a bundled version available in dist, where the css is bundled together with the component via webpack.
addSeatCallback: PropTypes.func(row, number)The callback executed when a seat is added
row, the row numberseat, the seat numberalpha: PropTypes.booltrue if your rows are enumerated using letters, false otherwise.
maxReservableSeats: PropTypes.numberThe maximum number of seats that can be selected.
removeSeatCallback: PropTypes.func(row, number)The callback executed when a seat is removed
row, the row numberseat, the seat numberrows: PropTypes.arrayOf(RowType)The array containing the data to build the seatmap.
RowType is defined as PropTypes.arrayOf(SeatType), and SeatType is
PropTypes.shape({
number: PropTypes.string.isRequired,
isReserved: PropTypes.bool
});
where
number is the seat number;isReserved tells whether the seat is already reserved or not (you can leave this empty when the seat is free)If there is no seat at that location (e.g., space next to an aisle seat), put null.
seatWidth: PropTypes.number (default: 35)The seat width. Needs to be customized as the seatmap width are computed from this number.
FAQs
A React component to display a minimal, yet functional seatmap.
We found that react-seatmap 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
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.