Animated gifs are used a lot on the web to demonstrate new features of software or quick tutorials for web services. So far this could be done easily only with professional software like Camtasia. Techsmith, the same company that also produces Camtasia has made this feature free for the Snagit Chrome extension.
The new feature just works like conventional screen recording. When the recording has finished it is automatically uploaded to your Drive and you have the additional options of sharing via YouTube or uploading to Drive as an animated gif.
Having the gif automatically saved to your drive has the advantage that you can immediately share it with your students, or you can use it in a Google doc or Slides presentation.
Link: https://chrome.google.com/webstore/detail/techsmith-snagit/fcnghgbgmemnlbckdipnmelbanpgneik
Link: https://chrome.google.com/webstore/detail/techsmith-snagit/fcnghgbgmemnlbckdipnmelbanpgneik