loading code fetching the highlighted snippet
The card is the present + child child of AnimatePresence. When it closes it is relegated: the thumbnail takes its layoutId back and grows out of it, while the card stays mounted and fades out until that animation ends.
layoutId: opening the card makes it
the lead, so it grows out of its thumbnail.exit prop, as in Motion.shown, the colour latched
while it was open, instead of open, which is null while it closes.