Replies: 2 comments
-
+1 |
Beta Was this translation helpful? Give feedback.
-
You bring up a great point! TailwindCSS could definitely benefit from adding utilities for handling CSS classes during drag-and-drop events, similar to how it handles hover, focus, and other states. While Tailwind doesn't natively support drag-and-drop events like dragover or drop, you can achieve this functionality by adding custom classes using JavaScript. For example, you could toggle classes like dragover on the target element when the drag event occurs. Alternatively, creating a custom plugin for TailwindCSS to extend its functionality for these events is also a good approach. It would be really handy to see this as an official feature in Tailwind! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request
I would like to change css classes on dropover etc. as per mdn documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/File_drag_and_drop
Is there any way this can be added to tailwindcss? That would be very handy for me, and I feel it is not inconsistent with tailwinds other modifiers: e.g. hover, focus etc.
Beta Was this translation helpful? Give feedback.
All reactions