005 Drag Ripple
ड्रैग से क्रम बदलना, आइटम रास्ता देते हुए
ड्रैग से क्रम बदलने के लिए कर्सर, छोड़ने की जगह दिखाने वाली लाइन और दोनों तरफ़ के आइटम का रास्ता देना; लिस्ट, कानबान और क्षैतिज कतारों के लिए।
ड्रैग से क्रम बदलने के कई इंटरफ़ेस में खींचते समय बाकी आइटम हिलते नहीं, छोड़ने के बाद लिस्ट अचानक नए क्रम में आ जाती है, और आइटम किन दो आइटम के बीच गया, यह छोड़ने के बाद ही जाँचा जा सकता है। ये पाँच नियम उपयोगकर्ता को छोड़ने से पहले ही नतीजा दिखाते हैं:
- कर्सर: खींचे जा सकने वाले हर एलिमेंट पर लगाएँ। होवर पर हाथ वाला कर्सर और ड्रैग के दौरान पकड़ने वाला हाथ दिखे, ताकि उपयोगकर्ता दबाने से पहले ही जान ले कि इसे खींचा जा सकता है।
- खींचा गया आइटम: पॉइंटर के साथ चलता है, पर छोड़ने की जगह से हटकर रहता है ताकि ड्रॉप लाइन न ढके। क्षैतिज कतार में ऊपर उठ जाता है; लंबवत लिस्ट में एक तरफ़ खिसककर लगभग 90% तक छोटा हो जाता है। उसकी पुरानी जगह साथ-साथ बंद हो जाती है।
- ड्रॉप लाइन: छोड़ने की जगह दिखाती है; यह बहुत हल्की पतली लाइन है, जिसका रंग टेक्स्ट के रंग का लगभग 15% होता है; क्षैतिज कतार में खड़ी और लिस्ट में आड़ी होती है; दिखते समय बीच से दोनों सिरों की ओर फैलती है, जगह बदलने पर खिसककर वहाँ पहुँचती है, और आइटम की पुरानी जगह पर नहीं दिखती।
- रास्ता देना: ड्रॉप लाइन के दोनों तरफ़ के आइटम बाहर की ओर हटते हैं, और जितने पास हों, उतना ज़्यादा और उतनी जल्दी हटते हैं: खिसकना = 10px × 0.7ⁿ, देरी = 24ms × n, जहाँ n ड्रॉप लाइन से बीच के आइटम की गिनती है, और सटे हुए आइटम के लिए 0। आइकन 10px से और कार्ड 8px से शुरू होते हैं।
- छोड़ना और रद्द करना: छोड़ने पर आइटम ख़ाली जगह में आ जाता है, और बाकी आइटम स्प्रिंग एनिमेशन के साथ नई जगह पर जाते हैं; Esc दबाने या लिस्ट के बाहर छोड़ने को रद्द माना जाता है, और सब आइटम अपनी पुरानी जगह लौट जाते हैं।
इसके अलावा, आइटम सिर्फ़ transform से हिलाएँ, लेआउट न बदलें; क्रम बदलना कीबोर्ड से भी हो सके; “कम मोशन” चालू हो, तो सिर्फ़ ड्रॉप लाइन रखें।
पैरामीटर
- खिसकना
- आइकन 10px; कार्ड 8px; हर अगले आइटम के लिए × 0.7
- देरी
- हर अगले आइटम के लिए +24ms
- स्प्रिंग
- बहुत कम ओवरशूट; लगभग 0.25s में रुक जाता है
- ड्रॉप लाइन
- टेक्स्ट के रंग का लगभग 15%
साथ दिया गया प्रॉम्प्ट प्रोजेक्ट के मौजूदा ड्रैग लॉजिक को दोबारा इस्तेमाल करता है और यह इफ़ेक्ट आपकी बताई लिस्ट, पंक्ति और डॉक में जोड़ता है।
Make drag-to-reorder in my product feel like this. Apply it to the lists, rows and docks I name, and reuse any drag helper the project already has. 1. Cursor: a pointing hand over anything draggable, a grabbing hand while dragging. 2. Lift: the picked item follows the pointer, raised off the list so it never hides where it will land: above a horizontal row, or pulled aside and shrunk to about 90% in a vertical list. Its old slot closes up. 3. Drop hint: a faint, thin line in the gap where it will land (vertical in a row, horizontal in a list), about 15% of the text color. It grows from its middle when it appears and glides to each new gap. No line over the item's own slot. 4. Ripple: items on both sides of the line lean away from it. Counting n from the line (0 = the item touching it), item n moves A x 0.7^n (A is about 10px for icons, 8px for cards) and starts 24ms x n later, on a quick spring that barely overshoots and settles in about 0.25s. Nearer items move sooner and further, so the push spreads out like a ripple. 5. Drop: the item takes the gap and every item springs into its new place. Escape or dropping outside the list cancels, and everything springs back. 6. Give each motion its own curve (hand-like for the pointer, a small pop for the lift, springs for settling) instead of one ease-out everywhere. Move things with transforms, not layout. Let the keyboard reorder too, and with reduced motion keep only the line.





















