Giter Club home page Giter Club logo

vue-transitions-css's Introduction

vue-transitions-css

All Contributors

A lightweight CSS library for for adding transitions to Vue components ⭐

Demo | Contribution | Changelog

USAGE

Installation via NPM:

npm install vue-transitions-css

In the main.js file:

...

import 'vue-transitions-css';

...

This imports the minified css distribution file globally, available for use anywhere in the project.

In any .vue file:

  <transition name="fade">
    <Content v-if="show" />
  </transition>

Be sure to set the mode of the transition so it doesn't appear janky:

  <transition name="fade" mode="out-in">
    <Content v-if="show" />
  </transition>

purgeCSS fix

In some cases, the animations would work during development, but not when you build and deploy to production. This issue is most likely with purgeCSS or any other optimization tool. especially if you use Nuxt.js and TailwindCSS module.

To fix the issue: In your purgeCSS config, you have to whitelist every animation class you use in your app. If you use the fade-x animation for example, add a regexe pattern for purgeCSS to ignore any css class that will include fade-x in it's name.

in nuxt.config.js:

export default {
   purgeCSS: {
    whitelistPatterns: [/fade-x/]
  }
}

Contributors ✨

Thanks goes to these wonderful people (emoji key):


jonathan

💻 🚧

Simeon Udoh

💻 🎨

This project follows the all-contributors specification. Contributions of any kind welcome!

vue-transitions-css's People

Contributors

allcontributors[bot] avatar bemijonathan avatar dependabot[bot] avatar edmund1645 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

vue-transitions-css's Issues

Need more animations

If you'd like to contribute please drop a comment and I'd be glad to help get you up and running

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.