Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Bootstrap
  • Tailwind
  • Bulma
  • Foundation
  • Primer
  • Spectre
  • Onsen UI
  • Semantic UI
  • Pure CSS
  • Materialize
  • SASS
  • LESS
  • Blaze UI
  • CSS Frameworks
  • Color Picker
  • CSS
  • CSS Formatter
  • Web Technology
Open In App
Next Article:
Primer CSS Borders
Next article icon

Primer CSS Animations

Last Updated : 07 Mar, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

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.

Syntax:

<span class="Primer-CSS-Animations">      ...  </span>

Example 1: Below example illustrates the Primer CSS Animations.

HTML
<!DOCTYPE html> <html>  <head>     <title> Primer CSS Animations </title>     <link rel="stylesheet" href= "https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> </head>  <body>     <div class="text-center">         <h1 class="color-fg-success"> GeeksforGeeks </h1>         <strong>Primer CSS Animations</strong>     </div>     <div class="m-2 p-2 Box">         <span class="anim-fade-in">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Fade In Animation</span>         <span class="anim-fade-out">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Fade Out Animation</span>         <span class="anim-fade-up">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Fade Up Animation</span>      </div> </body> </html> 

Output:

 

Example 2: The following code demonstrates the other animation classes listed above.

HTML
<!DOCTYPE html> <html>  <head>     <title> Primer CSS Animations </title>     <link rel="stylesheet" href= "https://unpkg.com/@primer/css@^18.0.0/dist/primer.css" /> </head>  <body>     <div class="text-center">         <h1 class="color-fg-success"> GeeksforGeeks </h1>         <strong>Primer CSS Animations</strong>     </div>     <div class="m-2 p-2 Box">         <span class="anim-fade-down">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Fade Down Animation</span>         <span class="anim-scale-in">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Scale In Animation</span>         <span class="anim-grow-x">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Grow X Animation</span>      </div>      <strong>Primer CSS Hover Animation     <div class="m-2 p-2 anim-hover-grow Box">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check anim-rotate"                 aria-hidden="true">             <path             fill-rule="evenodd"             d="M6.3 5.69a.942.942 0 0                1-.28-.7c0-.28.09-.52.28-.7.19-.18.42-.28.7-.28.28               0 .52.09.7.28.18.19.28.42.28.7               0 .28-.09.52-.28.7a1 1 0                0 1-.7.3c-.28 0-.52-.11-.7-.3zM8               7.99c-.02-.25-.11-.48-.31-.69-.2-.19-.42-.3-.69-               .31H6c-.27.02-.48.13-.69.31-.2.2-.3.44-.31               .69h1v3c.02.27.11.5.31.69.2.2.42.31.69.31h1c.27                0 .48-.11.69-.31.2-.19.3-.42.31-.69H8V7.98v.01zM7                2.3c-3.14 0-5.7 2.54-5.7 5.68                0 3.14 2.56 5.7 5.7 5.7s5.7-2.55               5.7-5.7c0-3.15-2.56-5.69-5.7-5.69v.01zM7                .98c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.12-7-7 3.14-7 7-7z"             />           </svg>         <span class="content p-2">Primer CSS Rotate Animation</span>         <span class="anim-pulse">           <svg width="12"                 height="16"                 viewBox="0 0 12 16"                 class="octicon octicon-check"                 aria-hidden="true">             <path fill-rule="evenodd"                    d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z" />           </svg>         </span>         <span class="content p-2">Primer CSS Pulse Animation</span>             </div> </body> </html> 

Output:

 

Next Article
Primer CSS Borders

S

skyridetim
Improve
Article Tags :
  • Web Technologies
  • CSS
  • Primer-CSS
  • Primer-CSS Utilities

Similar Reads

    Primer CSS
    Primer CSS is a free open-source CSS framework built with the GitHub design system to support the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure that our patterns are steady and intero
    3 min read
    Primer CSS Introduction
    Primer CSS is a free open-source CSS framework that is built with the GitHub design system to provide support to the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are ste
    4 min read

    Primer CSS Utility

    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
    4 min read
    Primer CSS Borders
    Primer CSS is a free and open-source CSS framework. It is built upon the systems that create the foundation of the basic style elements such as spacing, typography, and color. Created with GitHub’s design system, it is highly reusable and flexible.Primer CSS Borders is a utility class that applies b
    3 min read
    Primer CSS Box shadow
    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
    4 min read
    Primer CSS Colors
    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. It is highly reusable and flexible. I
    7 min read
    Primer CSS Details
    Primer CSS is a free open-source CSS framework that is built upon a GitHub design system to provide support to the broad spectrum of GitHub websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are stead
    2 min read
    Primer CSS Flexbox
    Primer CSS is a free open-source CSS framework based on principles that set the foundation for basic design elements like spacing, typeface, and color. This rigorous approach ensures that our patterns are consistent and interoperable.Primer CSS Flexbox:Flex container: Flex Container is used to make
    6 min read
    Primer CSS Grid
    Primer CSS is a free open-source CSS framework that is built with the GitHub design system to provide support to the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure that our patterns ar
    4 min read
    Primer CSS Layout
    Primer CSS is a free and open-source CSS framework. It is built upon the systems that create the foundation of the basic style elements such as spacing, typography, and color. Created with GitHub’s design system, it is highly reusable and flexible.Primer CSS Layout is used to change the document lay
    2 min read
    Primer CSS Margin
    Primer CSS is a free and open-source CSS framework that is built using the GitHub design system for providing support to the broad spectrum of GitHub websites. It helps in creating the foundation of the basic style elements such as spacing, components, typography, color, etc.In this article, we'll s
    3 min read
    Primer CSS Padding
    Padding is used to create space around the element, inside any defined border. We can set different padding for individual sides(top, right, bottom, left). It is important to add border properties to implement padding properties.Primer CSS Padding:Shorthand: Padding has many variations, that can be
    3 min read
    Primer CSS Typography
    Primer CSS is a free open-source CSS framework that is built upon a GitHub design system to provide support to the broad spectrum of GitHub websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are stead
    5 min read

    Primer CSS Components

    Primer CSS Alerts
    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. It is highly reusable and flexible. It is created with GitHub’s design system.Alerts are used to signify an important message to th
    3 min read
    Primer CSS Autocomplete
    Primer CSS is a free open-source CSS framework that's created upon systems that make the insights of the essential style elements like spacing, typography, and color. This methodical system makes sure its patterns are steady and interoperable with every other. It's largely reusable and adaptable.  I
    3 min read
    Primer CSS Avatars
    Primer CSS is a free open-source CSS framework that's built upon systems that make the inspiration of the essential style elements like spacing, typography, and color. This systematic method makes sure its patterns are steady and interoperable with every other. it's highly reusable and versatile.  I
    4 min read
    Primer CSS Blankslate
    Primer CSS is a free and open-source CSS framework. It is built upon the systems that create the foundation of the basic style elements such as spacing, typography, and color. Created with GitHub’s design system, it is highly reusable and flexible. Primer CSS Blankslate is used as a placeholder when
    5 min read
    Primer CSS Box Overlay
    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
    2 min read
    Primer CSS Branch name
    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
    2 min read
    Primer CSS Breadcrumbs
    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. It is highly reusable and flexible. It is created with GitHub’s design system.Primer CSS offers us so many components, and Breadcru
    2 min read
    Primer CSS Buttons
    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
    2 min read
    Primer CSS Dropdown
    Primer CSS is a free and open-source CSS framework that is built using the GitHub design system for providing support to the broad spectrum of GitHub websites. It helps in creating the foundation of the basic style elements such as spacing, components, typography, color, etc.Dropdowns are lightweigh
    4 min read
    Primer CSS Forms
    Primer CSS is a free and open-source CSS framework. It is built upon the systems that create the foundation of the basic style elements such as spacing, typography, and color. Created with GitHub’s design system, it is highly reusable and flexible.Primer CSS Forms provide different components for in
    6 min read
    Primer CSS Header
    Primer CSS is a free open-source CSS framework that is built upon a GitHub design system to provide support to the broad spectrum of GitHub websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are stead
    3 min read
    Primer CSS Labels
    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
    3 min read
    Primer CSS Links
    Primer CSS is a free and open-source CSS framework. It is built upon the systems that create the foundation of the basic style elements such as spacing, typography, and colour. Created with GitHub’s design system, it is highly reusable and flexible.Primer CSS Links are used to decorate links in the
    3 min read
    Primer CSS Loaders
    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
    2 min read
    Primer CSS Markdown
    Primer CSS is a free open-source CSS framework built with the GitHub design system to support the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure that our patterns are steady and intero
    3 min read
    Primer CSS Navigation
    Primer CSS is a free open-source CSS framework that is formed upon systems that establish the foundation of the basic style elements such as spacing, typography, and color. This systematic structure ensures our patterns are stable and interoperable with every other. Its approach to CSS is inspired b
    6 min read
    Primer CSS Pagination
    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
    2 min read
    Primer CSS Popover
    Primer CSS is a free open-source CSS framework that is built upon a GitHub design system to provide support to the broad spectrum of GitHub websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are stead
    5 min read
    Primer CSS Progress
    Primer CSS is a free open-source CSS framework that is built upon the GitHub design system to provide support to the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are ste
    4 min read
    Primer CSS Select menu
    Primer CSS is a free open-source CSS framework built on principles that establish the foundation for basic design elements including spacing, typeface, and color. Our patterns will be consistent and compatible as a result of this method. Its CSS approach is influenced by object-oriented CSS concepts
    4 min read
    Primer CSS Subhead
    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
    2 min read
    Primer CSS Timeline
    Primer CSS is a free open-source CSS framework that is built upon the GitHub design system to provide support to the broad spectrum of Github websites. It creates the foundation of the basic style elements such as spacing, typography, and color. This systematic method makes sure our patterns are ste
    7 min read
    Primer CSS Toasts
    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
    3 min read
    Primer CSS Truncate
    Primer CSS is a CSS framework that comes with pre-styled components and a design language with spacing, typography, and Theming that helps in building a website effectively. This systematic method makes sure our patterns are steady and interoperable with every other. It is created with GitHub’s desi
    2 min read

    Primer CSS Marketing

    Primer CSS Marketing Buttons
    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. It is highly reusable and flexible. It is created with GitHub’s design system.Buttons are used to define an action that can be perf
    2 min read
    Primer CSS Marketing Filters
    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. It is highly reusable and flexible. It is created with GitHub’s design system.Filters are used to change the overall background or
    2 min read
    Primer CSS Marketing Links
    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
    2 min read
    Primer CSS Marketing Typography
    Typography is a feature of Primer for styling and formatting the text content. It is used to create headings, subheadings, paragraphs, pull quotes, add more design-oriented font styles, and much more. It's responsive, but on a smaller scale, and the headlines are set in the marketing typeface.Primer
    3 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences