Primer CSS Animations
Primer CSS is a free open-source CSS framework that is built upon systems that create the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are steady and interoperable with every other. Its approach to CSS is influenced by Object-Oriented CSS principles, functional CSS, and BEM architecture. It is highly reusable and flexible. It is created with GitHub’s design system.
Animations are the most common things on the web. Animations in sense of motions that can be used on buttons, forms, or any other components. So the Primer CSS Provides us with animations classes that you can use to emphasize an element.
There are nine types of animation in Primer CSS animation, they all have individual classes which is required to perform that animation.
In this article we will not describe the classes in detail, all of them are briefly described below.
Primer CSS Animations:
- Fade in: The anim-fade-in class is used to fade in an element on the page. It will run once when the element is revealed.
- Fade out: The anim-fade-out class is used to fade out an element on the page. It will run once when the element is revealed.
- Fade up: The anim-fade-up class is used to fade up an element on the page. It will run once when the element is revealed.
- Fade down: The anim-fade-down class is used to fade down an element on the page. It will run once when the element is revealed.
- Scale in: The anim-scale-in class is used to scale the element in, this can be used in menus.
- Grow x: The anim-grow-x class is used to grow an element width from 0-:100: real quick.
- Pulse: The anim-pulse class is used to add pulse effect on elements on the page.
- Hover animation: The anim-hover-grow class is used to add any animation on hovering
- Rotation: The anim-rotate class is used to add rotation effect on elements on the page.
<span class="Primer-CSS-Animations"> ... </span>
Example 1: Below example illustrates the Primer CSS Animations.
Example 2: The following code demonstrates the other animation classes listed above.