Add option for animation duration.