Giter Site home page Giter Site logo

shuddha2021 / react-draggable-sortable-list Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 66.32 MB

An interactive, user-friendly list management application built with React. Features include drag-and-drop sorting and item selection.

Home Page: https://react-sortable-list.vercel.app

HTML 21.11% CSS 11.41% JavaScript 67.48%
drag-and-drop interactive javascript list-management react sortable-list sortable-list-app state-management user-interface web-development

react-draggable-sortable-list's Introduction

React Draggable Sortable List

React Draggable Sortable List is a dynamic and user-friendly web application that allows users to manage a list of items efficiently. With its intuitive drag-and-drop interface, users can seamlessly organize their list, prioritize items, and track progress in real-time.

Key Features

  • Drag-and-Drop Interface: Effortlessly move items within the list with a simple drag-and-drop action.
  • Item Selection: Select items using checkboxes for easy identification and management.
  • Persistent State: The state of the list is maintained using React’s state management, ensuring continuity even after refreshing or closing the app.
  • Modular Structure: The application is built using modular React components, allowing for clear organization and easy customization.

Core Logic

The core logic of the application is implemented in the SortableList component. Here’s a brief overview of how it works:

  • State Initialization: The initial state of the list is set using the useState hook from React. Each item in the list has an id, label, and checked property.

  • Drag and Drop: The onDragStart event is used to store the index of the dragged item and its column. The onDrop event is used to swap the dragged item with the dropped item using the swapArrayElements function.

  • Checkbox Change: The handleCheckboxChange function is used to update the checked property of an item when its checkbox is toggled.

  • Rendering Items: The renderItem function is used to render each item in the list. It sets up the necessary drag-and-drop events and renders the item’s checkbox and label.

  • List Splitting: The list of items is split into two halves, which are rendered in separate columns. This is done in the return statement of the SortableList component.

Technologies Used

  • React: A powerful JavaScript library for building user interfaces, ensuring a smooth and responsive user experience.
  • JavaScript: The primary programming language used for building the application logic and implementing advanced features.
  • Material-UI: A popular React UI framework used for designing a visually appealing user interface.

Getting Started

To run the React Draggable Sortable List locally, follow these steps:

  1. Clone the repository: git clone https://github.com/your-username/React-Draggable-Sortable-List.git
  2. Navigate to the project directory: cd React-Draggable-Sortable-List
  3. Install dependencies: npm install
  4. Start the development server: npm start
  5. Open your browser and visit http://localhost:3000 to view the app.
Screenshot 2024-04-29 at 12 14 11 PM

Contributing

Contributions to the React Draggable Sortable List are highly welcomed! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request. Together, we can make this app even better and help more users manage their lists efficiently.

License

This project is licensed under the MIT License. For more information, see the LICENSE file.

Acknowledgments

  • React Documentation: A comprehensive resource for learning React.
  • Material-UI Documentation: For guidance on using the Material-UI framework.
  • Open-Source Community: For providing resources and platforms that make collaborative projects possible.

Streamline your list management with React Draggable Sortable List! Enjoy using the app to organize your items efficiently.

react-draggable-sortable-list's People

Contributors

shuddha2021 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.