
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
use-posed-wave
Advanced tools
A React hook that returns a "react-pose" svg path component animated like a wave.
Given a size and amplitude parameters, the hook returns an enhanced component and a "pose" string to pass it. By default, every 3s the wave goes down, morph a little, then up - indefinitely.
function App() {
// Configure the wave animation and get the component to render.
// Hint: You could pass the screen width as `x` and any height as `y`
// to make a full screen width animation.
const [Wave, wavePose] = usePosedWave({ size: { x: 200, y: 50 , amplitude: 25 });
const [Foam, foamPose] = usePosedWave({ size: { x: 200, y: 50 , amplitude: 35, originOffset: 15 });
// The component being a SVG path tag, it must be wrapped inside a <svg/>
// component.
return (
<svg width={size.x} height={size.y * 2} style={{ background: "sandybrown" }} >
{Foam && <Foam pose={foamPose} fill="white" />
{Wave && <Wave pose={wavePose} fill="teal" />}
</svg>
)
}
⚠️ Note: The component will re-render if the "size" parameter changes. Either define it outside the component or with React.useState.
Has react, react-pose and popmotion as --peer dependencies.
yarn add use-posed-wave
yarn add --peer react react-pose popmotion
or
npm i use-posed-wave
npm i --peer react react-pose popmotion
const { usePosedWave } = require('use-posed-wave')
Required:
size: { x: number, y: number } The bounding rect of the animation.amplitude: number The animation's y distance it grows (in pixel).Optional:
optionalDuration: number || 3000 The duration for the wave to transit from one
state to the other.optionalOffset: number || 0 The y offset to add to the generated path.optionalFade: boolean || false Should the wave fade in and out during the
transition?Without those libraries, this hook would not exists.
MIT
FAQs
React hook to animate a wave-like effect with SVG.
The npm package use-posed-wave receives a total of 1 weekly downloads. As such, use-posed-wave popularity was classified as not popular.
We found that use-posed-wave 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.