# bus-seat-structuring

> This is a fully open-source package that allows for easy importing of bus seat structures into your project. The primary purpose of developing this package is to assist university students in their academic projects.

Latest version **5.3.0** (published 2026-05-14) · 0 weekly downloads

## Install

```sh
npm install bus-seat-structuring
pnpm add bus-seat-structuring
yarn add bus-seat-structuring
bun add bus-seat-structuring
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 5.3.0 |
| Published | 2026-05-14 |
| First published | 2023-11-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 29.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | naduns99 |
| Keywords | bus, seat, structure, component, react, library |

## Links

- npm: https://www.npmjs.com/package/bus-seat-structuring
- npm.io page: https://npm.io/package/bus-seat-structuring

## Dependencies (8)

- [react](https://npm.io/package/react.md) ^19.2.6
- [react-dom](https://npm.io/package/react-dom.md) ^19.2.6
- [web-vitals](https://npm.io/package/web-vitals.md) ^5.2.0
- [react-scripts](https://npm.io/package/react-scripts.md) 5.0.1
- [bus-seat-structuring](https://npm.io/package/bus-seat-structuring.md) ^5.2.2
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^16.3.2
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^6.9.1
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^14.6.1

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.3.0 (latest) — 2026-05-14
- 5.2.2 — 2023-11-25
- 5.2.1 — 2023-11-25
- 5.2.0 — 2023-11-25
- 5.1.0 — 2023-11-25
- 5.0.11 — 2023-11-25
- 5.0.10 — 2023-11-25
- 5.0.9 — 2023-11-25
- 5.0.8 — 2023-11-25
- 5.0.7 — 2023-11-25
- 5.0.6 — 2023-11-25
- 5.0.5 — 2023-11-25
- 5.0.4 — 2023-11-25
- 5.0.3 — 2023-11-25
- 5.0.2 — 2023-11-25
- … 16 more at https://npm.io/package/bus-seat-structuring/versions

## README

# Bus Seats Structuring

This is a fully open-source package that allows for easy importing of bus seat structures into your project. The primary purpose of developing this package is to assist university students in their academic projects.

## Authors

- [@nadun_sandeepa](https://www.linkedin.com/in/nadun-sandeepa-62aba9194/)


## Installation

To install this package into a React project, you can use npm

```bash
  npm install bus-seat-structuring@latest --force
```
    
## Usage/Examples

Upon importing the package, you can utilize the structure by using the **<Seat busmodel={''} bookedSeatsList={[]} booked_seats={booked_seats}/>** tag.

```javascript
import React from 'react';
import { Seat } from 'bus-seat-structuring'; 

function App() {
  
  function booked_seats(clickedSeats){
    alert(clickedSeats);
  }

  return (
    <div className="App">
      <Seat 
            busmodel={'layland_seats_49'}
            bookedSeatsList={[]}
            booked_seats={booked_seats}
            />
    </div>
  );
}
```

- **bookedSeatsList** - The list of booked seats. (Example : ['1-2', '3-4', '5-6'])

- **booked_seats** - When seats are booked, the updated information will be displayed.

- **busmodel** - Busmodel refers to the structure of the bus you desire. The list of available bus structures and their respective codes are as follows:

## Supported Bus Models

| Bus Model             | Code                                                                |
| ----------------- | ------------------------------------------------------------------ |
| Ashok Layland seats 49 | layland_seats_49 |
| Ashok Layland seats 54 | layland_seats_54 |
| Volvo 9100 | volvo_9100 |


## Screenshots

**Before Bookings.**
![App Screenshot](https://i.imgur.com/vWuXe2Z.png)



**After bookings.**
The seats that are already reserved will be displayed in red. When a user clicks on a seat, it will change to a yellow color to indicate that it has been selected or clicked.

![App Screenshot](https://i.imgur.com/impwyFg.png)


## Support

For support, 
- email nadun2952@gmail.com
- LinkedIn : https://www.linkedin.com/in/nadun-sandeepa-62aba9194/

---
_Source: https://npm.io/package/bus-seat-structuring · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
