Animated icon

The Animated Icon component is used to display animated visual representations that enhance user experience by conveying actions, statuses, or interactive elements more effectively than static icons. It is intended for dynamic visual feedback in the UI.

Examples

Morphed by action (click) icons
Loading story...
Infinite animated by action (hover) icons
Loading story...

Guidelines

When to use

  • To indicate loading states or transitions.
  • To provide visual emphasis for an interactive element.
  • To enhance engagement with subtle motion feedback.
Icon nameUser actionWhen to use
GlAnimatedChevronRightDownIcon, GlAnimatedChevronLgRightDownIconClick, expand a sectionAccordion component, settings section, global navigation section
GlAnimatedChevronDownUpIcon, GlAnimatedChevronLgDownUpIconClickComment block, CRUD component, dropdown component
GlAanimatedDuoChatIconHoverGitLab Duo chat button
GlAnimatedLoaderIconLoading state, GitLab Duo writing an answer
GlAnimatedNotificationIconClickSubscribe/unsubscribe button
GlAnimatedSidebarIconClickShow/hide a sidebar button
GlAnimatedSmileIconHoverAdd reaction button
GlAnimatedSortIconClickSort button
GlAnimatedStarIconClickStar/unstar button
GlAnimatedTodoIconClickAdd/remove from todo list button
GlAnimatedUploadIconHoverDrop zone

When not to use

  • For essential UI actions where animation might cause unnecessary distraction.
  • In places where a static icon can sufficiently communicate the message.
  • If excessive animations could negatively impact performance.

Categories

TODO:
Add descriptions for morphed and infinitely animated icon categories. Create an issue

Accessibility

  • Use aria-label to describe the purpose of the animation for screen readers.
  • Ensure that animations are subtle and do not trigger motion sensitivity issues.
  • Allow users to disable animations where necessary.

Last updated at: