I'm tired of making pure animation prototypes, because it leaves tediously long codes. So this time I introduce you a bookshelf prototype, let just get back to interactive things.
Here's the link:
Don't delete too much books at a time! Two or three is good.
I've kept the codes under 500 lines. I think this will be a helpful reference for beginners.
This prototype includes following features:
1. Long press a book to enter editing mode.
2. Switch between normal and editing mode.
3. Book selection and shows the number of selected books.
4. Delete multiple books.
5. Plays an animation when deleting books.
6. Rearrange books automatically after deletion.
7. Recalculate height and position of scroll component after deletion.
If you like it, please give me a like on Dribbble, thank you very much!