Skip to content

phuocng/react-drag-drop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Drag and drop in React

Modern web applications offer a useful feature that allows users to drag and drop elements around the page. This creates a more intuitive and user-friendly experience, and it's become increasingly popular in recent years. In fact, drag and drop functionality has become so common that it's hard to imagine a modern web application without it. From social media platforms to e-commerce websites, drag and drop has become a staple of the user experience.

The reason for its popularity is simple: drag and drop is a powerful tool that can simplify complex tasks and make the user's life easier. You can find drag and drop functionality in a variety of real-world applications. For example, when using a file manager on your computer, you can drag files from one folder to another or onto an external drive. In video editing software, you can drag and drop clips onto a timeline to create a sequence. And in graphic design applications, you can drag and drop images and text boxes to create layouts.

On the web, drag and drop functionality can be used for a variety of purposes, such as moving items around in a to-do list or task manager, rearranging playlists or albums in music streaming services, or sorting products into a shopping cart or wishlist on e-commerce websites.

Implementing drag and drop functionality may require some additional coding compared to simple form inputs, but the benefits are well worth it. If you're a React developer, you'll be happy to know that this series can help you become a master of dragging and dropping within your React app. You'll get real-world examples and gradually work your way up to more advanced techniques. And the best part? We won't be using any external libraries, so you can see firsthand how it all works under the hood.

Get ready to elevate your React app with drag and drop functionality. Your users will love it!

If you found this series helpful, please consider giving this GitHub repository a star or sharing it on your favorite social networks 😍. Your support would mean a lot to me!

Table of contents

01: Make a given element draggable

Learn how to create a draggable element in React.

02: Make an element draggable on touchscreen devices

Learn how to support drag and drop on touchscreen devices.

03: Create a custom draggable hook

Learn how to create your very own React hook to add this draggable functionality, making it easy to reuse in different places.

04: Create a range slider

Learn how to develop a range slider component in React.

05: Create an RGB to HEX color converter

Learn how to use a range slider to build our own RGB to HEX color converter.

06: Create resizable split views

Learn how to create resizable split views with React.

07: Create a drawer

Learn how to create a Drawer component using React.

08: Create an image comparison slider

Learn how to create an image comparison slider with React.

09: Scroll by dragging

Explore how to implement drag-to-scroll functionality with React.

10: Build a custom scrollbar

Learn how to create a custom scrollbar with React.

11: Make a given element resizable

Learn how to make an element resizable using React.

12: Resize columns in a table

Learn how to resize columns by dragging the border using React.

13: Constrain a draggable element within its container

Learn how to keep a draggable element within its parent container with React.

14: Build a color picker

Explore how to create a color picker with React.

15: Craft an image cropper

Learn how to create an image cropper using React.

16: Build a magnifying glass for images

Show you how to create an image magnifier with React.

17: Select a portion of an element by clicking and dragging

Explore how to implement click and drag selection with React.

18: Crop a portion of an image

Explore how to crop a portion of an image using React.

19: Add annotations to an image

Learn how to add annotations to an image using React.

20: Take a screenshot of a portion of an element

Learn how to take a screenshot of a portion of an element with React.

21: Drag an element along a circle

Learn how to drag an element along a circle with React.

22: Create a radial progress bar

Explore how to create a radial progress bar with React.

23: Create a time picker

Explore how to create a time picker with React.

24: Snap a draggable element to a grid

Learn how to create snap-to grid functionality with React.

25: Create a linear gauge with discrete values

Explore how to use React to create a discrete linear gauge.

26: Use vertical and horizontal lines as guides for element positioning

Learn how to use the vertical and horizontal lines shown at the center as a guide when dragging an element around its container.