Slowly disappearing undo bar/button, is that possible?

I am just wondering if this is possible or has been tried before. I have a delete button that deletes an entry from a list. I think it would be nice to offer an “Undo button” that appears at the top of the list after the delete action and slowly disappears. It is very common these days in mail clients. It could be a header bar or floating button. Is this possible and if so, how would you go about it?