framer motion animate code example
Example: fremer motion react library
const [selectedId, setSelectedId] = useState(null) {items.map(item => ( setSelectedId(item.id)}> {item.subtitle} {item.title} ))} {selectedId && ( {item.subtitle} {item.title} setSelectedId(null)} /> )}