CSS3 Animations with special effects

Overview

🎩 magic

CSS3 Animations with special effects. (→ 3.1 kB gzip)

Demo

Checkout the demo for the animations here

Table of Contents

Installation

GitHub Package Registry - Package url

npm install @minimac/magic.css

NPM - Package url

npm i magic.css

YARN - Package url

yarn add magic.css

Getting Started

Include the file magic.css or include the minified version magic.min.css

<link rel="stylesheet" href="yourpath/magic.css">

or

<link rel="stylesheet" href="yourpath/magic.min.css">

Usage with JavaScript

This is a sample code for on hover effect with JavaScript. First, Include the class magictime and then a desired animation class.

const selector = document.querySelector('.yourdiv')
selector.classList.add('magictime', 'puffIn')

If you want to load the animation after certain time, you can use this example:

//set timer to 5 seconds, after that, load the magic animation
function myFunction() {
    const selector = document.querySelector('.yourdiv')
    selector.classList.add('magictime', 'puffIn')
}
setTimeout(myFunction, 5000);

If you want to load the animation after certain time but with an infinite loop, you can use this example:

//set timer to 3 seconds, after that, load the magic animation and repeat forever
function myFunction() {
    const selector = document.querySelector('.yourdiv')
    selector.classList.add('magictime', 'puffIn')
}
setInterval(myFunction, 3000);

Usage with jQuery

This is a sample code for on hover effect with jQuery. First, Include the class magictime and then the desired animation class.

$('.yourdiv').hover(function () {
    $(this).addClass('magictime puffIn');
});

If you want to load the animation after certain time, you can use this example:

//set timer to 5 seconds, after that, load the magic animation
setTimeout(function(){
    $('.yourdiv').addClass('magictime puffIn');
}, 5000);

If you want to load the animation after certain time but with infinite loop, you can use this example:

//set timer to 3 seconds, after that, load the magic animation and repeat forever
setInterval(function(){
    $('.yourdiv').toggleClass('magictime puffIn');
}, 3000 );

HTML & CSS tips

You can change the time of the animation by setting the class magictime for example:

.magictime {
    -webkit-animation-duration: 3s;
    animation-duration: 3s;
}

Default CSS timing is:

.magictime {
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
}

If you want to assign the timing to a specific animation, you can use the following code (use 2 class):

.magictime.magic {
    -webkit-animation-duration: 10s;
    animation-duration: 10s;
}

Animation Classes

MAGIC EFFECTS BLING STATIC EFFECTS STATIC EFFECTS OUT PERSPECTIVE ROTATE
magic puffIn openDownLeft openDownLeftOut perspectiveDown rotateDown
twisterInDown puffOut openDownRight openDownRightOut perspectiveUp rotateUp
twisterInUp vanishIn openUpLeft openUpLeftOut perspectiveLeft rotateLeft
swap vanishOut openUpRight openUpRightOut perspectiveRight rotateRight
openDownLeftReturn perspectiveDownReturn
openDownRightReturn perspectiveUpReturn
openUpLeftReturn perspectiveLeftReturn
openUpRightReturn perspectiveRightReturn
SLIDE MATH TIN BOMB BOING ON THE SPACE
slideDown swashOut tinRightOut bombRightOut boingInUp spaceOutUp
slideUp swashIn tinLeftOut bombLeftOut boingOutDown spaceOutRight
slideLeft foolishIn tinUpOut spaceOutDown
slideRight holeOut tinDownOut spaceOutLeft
slideDownReturn tinRightIn spaceInUp
slideUpReturn tinLeftIn spaceInRight
slideLeftReturn tinUpIn spaceInDown
slideRightReturn tinDownIn spaceInLeft

🎉 Gulp and SCSS (SASS) compiling

If you want to customize the CSS files, now you will have the chance. For example, if you want to include only certain animations, you will have to go to this file:

assets/scss/magic.scss

Comment or uncomment your desired file and run from terminal the following commands:

npm install

and last command:

gulp

Automatically this generate the new files!

Browser Support

Browser Chrome Firefox Safari iOS Safari Opera Android Android Chrome IE Opera Mini
Version 31+ 31+ 7+ 7.1+ 27+ 4.1+ 42+ 10+
Comments
  • Animation won't start? [chrome OS 27]

    Animation won't start? [chrome OS 27]

    I'm using a vanishIn via addClass and got a notice from a user which looks like as if the animation won't start/proceed: http://i.imgur.com/fIZxmHZ.png Chrome 27 on Chrome OS

    respective url: https://www.postagon.com/signup

    Never experienced that a CSS animation would just stuck right at the beginning. Any hints? Thanks

    bug 
    opened by marban 5
  • What about <tr> element?

    What about element?

    Hey,

    Thank's to you for the great job. It works perfectly on < img >, I tried to use the effet on a < tr >, for example to delete one with a fancy effect but nothing happens.

    Is it possible or not?

    Regards

    question 
    opened by sylouuu 5
  • demo site hacked?

    demo site hacked?

    Hi, my AV software (ESET Nod32 ) yells at me when I try to go to your demo-site (https://minimamente.com/example/magic_animations/)

    This web page contains potentially dangerous content. Threat: HTML/ScrInject.B trojan

    Maybe something you want to look into. Cheers

    opened by cklouman 4
  • pull in slang800/animate-stylus?

    pull in slang800/animate-stylus?

    Hey, I recently added all the animations from magic to my fork of animate.css, called animate-stylus. So, I was wondering if you'd be interested in pulling in the work that I did over there.

    Here's what this hypothetical PR would do:

    • Add all the animations from animate.css

    • Break up the Stylus into separate files so you can either include the entire library (like you do now) or include individual animations or include individual folders of animations with globbing.

      Also, it's much easier to track changes in git when you have files broken up nicely.

    • Remove the nonsemantic "name of animation" classes because they state the style (which is the job of CSS), rather than describing what the element is. Your HTML is for content, and your CSS is for style - thus, class names (a feature of HTML) should describe the content, not the style. But also add a short note in the readme that tells how to get them back.

    opened by notslang 3
  • strange but simple

    strange but simple

    Hi Thanks for you lib I'm trying to play with it quite simply

    TEST

    Hide Magic

    The link should slide the Title out of the page , if I'm not mistaken I included the link in the head but nothing works ? any idea ?

    question 
    opened by oceatoon 3
  • Reverse animation for a complete cycle

    Reverse animation for a complete cycle

    When we apply an animation, lets suppose it is "slideLeft"; it moves to a far left side. Is there a way using library that we can animate it back to its initial position?

    opened by khurramraheel 2
  • Line 195 and 60% animation keyframe

    Line 195 and 60% animation keyframe

    1. I think it's a typo in line 195,

    should ne like this:

    .perspectiveUpRetourn { backfe-visibility: visible; -webkit-animation-name: perspectiveUpRetourn; -moz-animation-name: perspectiveUpRetourn; -ms-animation-name: perspectiveUpRetourn; -o-animation-name: perspectiveUpRetourn; animation-name: perspectiveUpRetourn; }

    instead of

    .perspectiveUpRetourn backface-visibility: visible { -webkit-animation-name: perspectiveUpRetourn; -moz-animation-name: perspectiveUpRetourn; -ms-animation-name: perspectiveUpRetourn; -o-animation-name: perspectiveUpRetourn; animation-name: perspectiveUpRetourn; }

    2. 60% animation keyframe

    Something worng with your compilation scripts as we have this: 60% { opacity: 1; -webkit-transform-origin: NaN%; -moz-transform-origin: NaN%; -ms-transform-origin: NaN%; -o-transform-origin: NaN%; transform-origin: NaN%;

    opened by imeninnik 2
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • There is an error in your file on CDNjs

    There is an error in your file on CDNjs

    Hi, I was testing the file on the CDN and there was an animation that wasn't work, checking the code gotten from the CDN I realized that there is a typing error in the file on some animation names.

    Where it is the word "Retourn" it would be "Return" as in the file in your repo on GitHub.

    Captura de pantalla (4)

    I hope you can fix it.

    Greetings.

    opened by chrisjcom 1
  • Bump y18n from 3.2.1 to 3.2.2

    Bump y18n from 3.2.1 to 3.2.2

    Bumps y18n from 3.2.1 to 3.2.2.

    Commits
    Maintainer changes

    This version was pushed to npm by oss-bot, a new releaser for y18n since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump ini from 1.3.5 to 1.3.7

    Bump ini from 1.3.5 to 1.3.7

    Bumps ini from 1.3.5 to 1.3.7.

    Commits
    • c74c8af 1.3.7
    • 024b8b5 update deps, add linting
    • 032fbaf Use Object.create(null) to avoid default object property hazards
    • 2da9039 1.3.6
    • cfea636 better git push script, before publish instead of after
    • 56d2805 do not allow invalid hazardous string as section name
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by isaacs, a new releaser for ini since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
Releases(1.1.0)
CSS3 list scroll effects

stroll.js – because it scrolls, and trolls. A collection of CSS list scroll effects. Works in browsers with support for CSS 3D transforms including a

Hakim El Hattab 4.3k Jan 3, 2023
Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Especially designers and/or photographers will love this theme! Built with MDX and Theme UI.

Gatsby Starter Portfolio: Cara Playful and Colorful One-Page portfolio featuring Parallax effects and animations. Using the Gatsby Theme @lekoarts/gat

prashanth s 1 Dec 24, 2021
We are students of group named "Special-Team" of GоIT academy. We graduated JavaScript course and for consolidate in practice 📌 knowledges received on this course, we together 🤝 developed graduation project

Проект сайту "Filmoteka" Привіт! ?? Ми студенти групи під назвою "Special-Team" академії GоIT ?? ?? Ми закінчили курс JavaScript і для того, щоб закрі

Oksana Banshchykova 12 Jan 3, 2023
Chakra UI Animations is a dependancy which offers you pre-built animations for your Chakra UI components.

Chakra UI Animations Chakra UI Animations is a dependancy which offers you pre-built animations for your Chakra UI components. Installation yarn add @

Code Chemistry Inc. 9 Nov 19, 2022
This Project is made with HTML5, CSS3, ReactJS, Axios, MetaMask, thirdweb, Rinkeby Test Network, Web 3.0 Technologies, and OpenSea API.

Abstract Collections This Project is made with HTML5, CSS3, ReactJS, Axios, MetaMask, thirdweb, Rinkeby Test Network, Web 3.0 Technologies, and OpenSe

Shobhit Gupta 34 Jan 4, 2023
Simple To-do list build using HTML5, CSS3, JavaScript and Webpack. You can add new tasks, remove and edit them.

Simple To-do list build using HTML5, CSS3, JavaScript and Webpack. You can add new tasks, remove and edit them.

Esteban Munoz 6 Mar 5, 2022
A webpack based todo list with HTML5, CSS3, JS and linters

Project Name This is a project to track your daily tasks as a todo list. This project doesn't have a backend so data gets saved in you local storage.

Ritobroto Mukherjee 19 Aug 22, 2022
A planetary body simulator with a HTML5/CSS3/JS frontend and simulated using Rust WebAssembly.

Solar Sim ?? A planetary body simulator with a HTML5/CSS3/JS frontend and simulated using Rust WebAssembly. Try the latest version here! Built with ??

Ben Plate 3 Jun 15, 2022
CSS3 vendor prefix generator.

cssFx cssFx adds vendor-specific prefixes to your stylesheets. How it works When the document has finished loading, internal (<style>) and external (<

Ivan Malopinsky 275 Jul 30, 2022
Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser.

Modernizr is a JavaScript library that detects HTML5 and CSS3 features in the user’s browser. Read this file in Portuguese-BR here Our Website is outd

Modernizr 25.4k Jan 3, 2023
Responsive, CSS3, touch-enabled jQuery Coverflow plugin.

jQuery.Flipster Flipster is a CSS3 3D transform-based jQuery plugin built to replicate the familiar 'cover flow' effect, but also supports a variety o

Adrien Delessert 704 Dec 28, 2022
Convert Tailwind CSS class names into their CSS3-equivalent styles — right from Alfred.

alfred-tailwind2css Tailwind2CSS offers you the ability to convert TailwindCSS classes into their CSS3-equivalent styles -- right from within Alfred.

Stephan Casas 6 Dec 7, 2022
Adding volumetric effects to a built-in Three.js shader.

Magical Marbles in Three.js Adding volumetric effects to a built-in Three.js shader. Article on Codrops Demo Installation Install dependencies: yarn

Matt Rossman 68 Dec 9, 2022
Imagable - Create, Edit, Optimize And Add Effects to Images

Imagable Imagable is an open-source image editor build on top of Typescript and Node.js. We serve with next-gen tools and filters and effects to make

Haneen Mahdin 2 May 5, 2022
Little app for live coding effects for Matt Parker's xmas tree thing

Xmas Tree Lights App Little app for live coding and exporting effects for Matt Parker's Xmas tree experiment (2021 edition). You can check this out on

Pim Schreurs 8 Dec 12, 2022
A community ran noodle effects library developed for remapper.

The all around modchart helper that contains functions and utilities created by the community. These scripts are designed to be used with Remapper. Ch

null 5 Nov 4, 2022
A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website.

Cuberto Mouse Follower A powerful javascript library to create amazing and smooth effects for the mouse cursor on your website. Dependencies GSAP v3 (

Cuberto 410 Dec 30, 2022