
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
hello-goodbye
Advanced tools
Tiny library to apply enter, leave, and move transitions to DOM elements.
Tiny library to apply enter, leave, and move transitions to DOM elements. Inspired by Vue's <transition>
and <transition-group>
components, but in plain DOM.
npm install hello-goodbye --save
hello
Apply an enter transition to a newly-added element.
import { hello } from 'hello-goodbye';
parent.appendChild(el);
hello(el);
.enter-active { transition: transform .5s }
.enter-from { transform: translateY(100%) }
goodbye
Apply a leave transition to an element and remove it when finished.
import { goodbye } from 'hello-goodbye';
goodbye(el).then(() => parent.removeChild(el));
.leave-active { transition: opacity .5s }
.leave-to { opacity: 0 }
move
Smoothly move elements into their new positions.
import { move } from 'hello-goodbye';
move(parent.children, () => {
// Shuffle the children
for (let i = parent.children.length; i >= 0; i--) {
parent.appendChild(parent.children[Math.random() * i | 0]);
}
});
.move { transition: transform .5s }
transition
Run a named transition on an element. Used under the hood by hello
and goodbye
.
${name}-active
and ${name}-from
classes are added${name}-from
class is removed, and the ${name}-to
class is addedimport { transition } from 'hello-goodbye';
transition(
el: HTMLElement,
name: string,
options?: TransitionOptions
): Promise<void>;
type TransitionOptions = {
prefix?: string // optional prefix for animation class names
};
cancel
Cancel any currently-running transition on an element.
import { cancel } from 'hello-goodbye';
cancel(el: HTMLElement);
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
Tiny library to apply enter, leave, and move transitions to DOM elements.
The npm package hello-goodbye receives a total of 1 weekly downloads. As such, hello-goodbye popularity was classified as not popular.
We found that hello-goodbye demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.