https://github.com/mindinventory/react-native-bus-seat-layout
A @mindinventory/react-native-bus-seat-layout library provides seats layout for bus booking, you can give custom styles of seat numbers. also can give images for seat. you have to provide number of rows that you need to draw layout, you will get selected seats from props.
https://github.com/mindinventory/react-native-bus-seat-layout
bus-seat-booking bus-seat-layout custom-component custom-layout custom-view custom-views react react-native
Last synced: 11 months ago
JSON representation
A @mindinventory/react-native-bus-seat-layout library provides seats layout for bus booking, you can give custom styles of seat numbers. also can give images for seat. you have to provide number of rows that you need to draw layout, you will get selected seats from props.
- Host: GitHub
- URL: https://github.com/mindinventory/react-native-bus-seat-layout
- Owner: Mindinventory
- License: mit
- Created: 2022-04-28T04:28:57.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-09-23T09:44:56.000Z (over 1 year ago)
- Last Synced: 2025-06-19T19:46:42.773Z (12 months ago)
- Topics: bus-seat-booking, bus-seat-layout, custom-component, custom-layout, custom-view, custom-views, react, react-native
- Language: TypeScript
- Homepage: https://www.mindinventory.com/react-native-app-development.php
- Size: 882 KB
- Stars: 22
- Watchers: 4
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# @mindinventory/react-native-bus-seat-layout [](https://www.npmjs.com/package/@mindinventory/react-native-tab-bar-interaction)
A @mindinventory/react-native-bus-seat-layout library provides seats layout for bus booking, you can give custom styles of seat numbers. also can give images for seat. you have to provide number of rows that you need to draw layout, you will get selected seats from props.
Change node first:
```sh
nvm alias default 16
```
## Installation
using npm:
```sh
npm install @mindinventory/react-native-bus-seat-layout
```
using yarn:
```sh
yarn add @mindinventory/react-native-bus-seat-layout
```
## Preview


### Supported platform
- Android
- Ios
## Usage
```js
import SeatsLayout from '@mindinventory/react-native-bus-seat-layout';
```
```js
{
console.log('getBookedSeats :: ', seats);
}}
/>
```
# Props to use
| Parameter | Type | Description |
| --------------- | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| row | _number_ | Set number of rows to draw seat layout. |
| layout | _Layout (Optional)_ | Default value `columnOne: 2` & `columnTwo: 2`. |
| driverPosition | _string (Optional)_ | Accepts string args among `left` or `right`. Default is `right`. |
| isSleeperLayout | _boolean (Optional)_ | Accepts boolean value either `true` or `false`. Default is `false`. |
| maxSeatToSelect | _number (Optional)_ | Allow uset to select maximum number of seats to book in one go. Default value `7`. |
| selectedSeats | _Array (Optional)_ | Accepts value seatNumber `number` and seatType `number` which accepts value from (`booked` or `women` or `blocked`). Default its set to blank array. |
## Contributing!
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License!
@mindinventory/react-native-bus-seat-layout [MIT-licensed](https://github.com/Mindinventory/react-native-bus-seat-layout/blob/main/LICENSE).
# Let us know!
If you use our open-source libraries in your project, please make sure to credit us and Give a star to www.mindinventory.com
Please feel free to use this component and Let us know if you are interested to building Apps or Designing Products.