Relative Content

Tag Archive for reactjsdrag-and-dropoverflowreact-beautiful-dnd

How to restrict the draggable area of an element in react-beautiful-dnd

To clarify, I don’t mean defining a droppable area, I mean making it so that visually, you literally can’t drag items outside of a certain range. For example, if you have a div that houses a bunch of smaller elements and you’re currently using react-beautiful-dnd to drag and drop them within the parent div, even though they’ll just snap back when you let go you can still visually drag the elements outside of the div–that’s what I’d like to avoid.