Giter VIP home page Giter VIP logo

react-animation's Introduction

React Banner Ad

‼️ This project is archived and no longer maintained.

A thought experiment to explore CSS animations in React and React hooks.

Demo https://react-animation.onrender.com

Purpose

In the real world, there really isn't any reason to build a simple 300x600 banner ad using React; it can easily be done with raw CSS and JavaScript in many different ways, such as by doing a bunch of setTimeouts that add classes to HTML elements. However, I thought it would be an interesting thought experiment to make a banner ad using React to learn how to do animations in that environment and also learn about hooks along the way.

All styling in this project was done using CSS and zero image assets were used. All animations were done in CSS as well. No JavaScript was used to position, animate, or otherwise manipulate the styling of the components. CSS is very powerful! (And pseudo elements are magical ✨)

Styling Dependencies

In this project, I used the React Transition Group and Emotion libraries to animate and style my components. (Emotion in particular was chosen because it is what we use at The New York Times, and a secondary goal of this project was to see how I could incorporate animations into our app.)

Setup

This was scaffolded with create-react-app, so simply

  1. Clone and npm install.
  2. npm start.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.