UI/UX animation can be done with CSS or JavaScript. CSS offers transitions and animations but JavaScript is needed for more complex animations, animating SVG, or supporting older browsers. Anime.js is a lightweight JavaScript animation library that works with CSS, transforms, SVG, DOM, and JS objects. Optimal animation durations are 150-500ms depending on the device, with web animations being 150-200ms since users expect quick page transitions. Easing curves like ease-out and ease-in should be used for entering and exiting animations.