SortWave is a simple and interactive sorting visualizer built with React and daisyUI. It allows users to visualize various sorting algorithms, including Bubble Sort, Selection Sort, Insertion Sort, Quick Sort, Merge Sort, and Counting Sort.
- Visualize multiple sorting algorithms.
- Adjustable array size and sorting speed.
- Interactive and user-friendly interface.
- Real-time display of the array being sorted.
- Bubble Sort
- Selection Sort
- Insertion Sort
- Quick Sort
- Merge Sort
- Counting Sort
- Radix Sort
- React: A JavaScript library for building user interfaces.
- daisyUI: A Tailwind CSS component library for designing the UI.
- Tailwind CSS: A utility-first CSS framework for rapid UI development.
Check out the live demo of the project at SortWave.
Follow these instructions to set up and run the project locally.
- Node.js and npm installed on your machine.
-
Clone the repository:
git clone https://github.com/shabh2412/sorting-visualizer.git
-
Navigate to the project directory:
cd sorting-visualizer
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev
-
Open your browser and navigate to
http://localhost:5173
to see the application in action.
- Adjust the array size using the slider.
- Set the sorting speed using the speed control.
- Select a sorting algorithm by clicking the corresponding button.
- Watch the array being sorted in real-time!
sorting-visualizer/
├── public/
├── src/
│ ├── components/
│ │ ├── ArrayLength.jsx
│ │ ├── ArrayVisualizer.jsx
│ │ ├── HeroSection.jsx
│ │ └── Navbar.jsx
│ │ ├── SortButton.jsx
│ │ ├── SortSpeed.jsx
│ │ ├── ThemeController.jsx
│ ├── context/
│ │ └── ThemeContext.js
│ ├── App.css
│ ├── App.jsx
│ ├── index.css
│ ├── main.jsx
├── .eslintrc.cjs
├── .gitignore
├── LICENSE
├── package-lock.json
├── package.json
└── postcss.config.js
├── README.md
└── tailwind.config.js
└── vite.config.js
Contributions are welcome! Please feel free to submit a Pull Request or open an issue for any bugs or feature requests.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Open a Pull Request.
This project is licensed under the MIT License. See the LICENSE file for details.