npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

part-animator

v0.0.2

Published

一个 '极简' 且 '灵活' 的 CSS 过渡动画库

Downloads

1

Readme

PartAnimator

PartAnimator 是一个 '极简' 且 '灵活' 的 CSS 过渡动画库,可快速复用于各种 前端 项目中。使用前只需要引入 CSS 文件。然后开始调用你想要的的类样式 ~ ,除了使用原生写法,还可以通过开发框架来调用。

当前动画数:41 (持续更新)

快速上手

CSS 引入

<link rel="stylesheet" href="https://partanimator.glumi.cn/PartAnimator.css">

NPM 安装

npm install part-animator

HTML5 原生动画

PartAnimator 需要将父级元素设置为 flex 布局,然后给子元素指定相应的类样式即可使用。

<body>
    <div class="part-enter-1">过度内容</div>
</body>

<style>
    body {
        display: flex;
        justify-content: center;
        align-items: center;
    }
</style>

Vue.js 动画

与原生的道理一样,只需要在 Vue 中的 transition 属性中引入即可。同时,别忘了设置 flex 布局。

<template>
<div id="anim">
    <button @click="show=!show">显示/隐藏</button>
    <transition enter-active-class="part-enter-1" leave-active-class="part-leave-1">
    <h1 v-if="show">过渡内容</h1>
    </transition>
</div>
</template>

<script>
import css from 'part-animator/PartAnimator.css'
export default {
    data() {
        return {
            show: false
        }
    }
}
</script>

<style scoped>
    #anim {
        display: flex;
        justify-content: center;
        align-items: center;
    }
</style>

使用的过程中如果发生些问题,欢迎来给博主留言反馈,如果喜欢的话也可以来给个 Start 关注这个项目 : ) https://github.com/2670637999/PartAnimator

blog: https://blog.glumi.cn/47.html