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

vue-petite-transition

v2.0.2

Published

A simple solution for transition for petite-vue .

Downloads

149

Readme

Petite Vue Transition

Petite Transition Library for Petite Vue

Getting Started

Installation

npm install vue-petite-transition@latest
pnpm i vue-petite-transition
yarn add vue-petite-transition

CDN URLs

The short CDN URL is meant for prototyping. For production usage, use a fully resolved CDN URL to avoid resolving and redirect cost:

then in your html script where you defined your petite-vue instance

<script type="module">
import { createApp } from 'petite-vue'
import { transition } from 'vue-petite-transition'
// register the directive
createApp().directive('transition',transition).mount()
</script>

provided API for v-transition

  • v-transition:show
    • type: boolean
    • Whether the children should be shown or hidden
  • v-transition:enter
    • type: string
    • Classes added to the element during the entire enter phase.
    • e.g. v-transition:enter="duration-1000"
  • v-transition:enter-from
    • type: string
    • Classes added to the element before the enter phase starts.
    • e.g. v-transition:enter-from="opacity-0"
  • v-transition:enter-to
    • type: string
    • Classes added to the element immediately after the enter phase starts.
    • e.g. v-transition:enter-to="opacity-100"
  • v-transition:entered
    • type: string
    • Classes added to the element once the transition is done. These classes will persist after that, until it's time to leave.
    • e.g. v-transition:entered="opacity-100"
  • v-transition:leave
    • type: string
    • Classes added to the element during the entire leave phase.
    • e.g. v-transition:leave="duration-1000 ease-out"
  • v-transition:leave-from
    • type: string
    • Classes added to the element before the leave phase starts.
    • e.g. v-transition:leave-from="opacity-100"
  • v-transition:leave-to
    • type: string
    • Classes added to the element immediately after the leave phase starts.
    • e.g. v-transition:leave-to="opacity-0"

Example

** Just Passing enter enter-from enter-to values works **

<div v-scope="{ show:true }" class="h-96 w-96">
  <p>show: {{ show }}</p>
    <button @click="show = !show" class="px-2 bg-slate-900 py-0.5 flex items-center justify-center" > toggle </button>
  <div v-transition:show="!show"
    class="p-10 bg-sky-400 opacity-0 scale-90"
    v-transition:enter="duration-1000 transition-[opacity,transform]"
    v-transition:enter-from="opacity-0 scale-90"
    v-transition:enter-to="opacity-100 scale-100"
  >  Show {{!show}}
  </div>
</div>

Acknowledgement

Thanks, Now Have Fun Bye Bye !