百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
R

react-wavify

> 前端框架
开源

️ 适用于 React 的动画波浪组件

367 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

️ 适用于 React 的动画波浪组件

React Wavify

A simple React component which creates an animated wave.

Live Demo

This component is heavily adapted from Mikołaj Stolarski's awesome Codepen and is functionally similar to Benjamin Grauwin's Wavify plug-in.

Installation

Yarn

yarn
yarn add react-wavify

npm

npm
npm install react-wavify

Usage

javascript
import React from 'react'
import Wave from 'react-wavify'

const App = () => (
  
)

Simply add the Wave component to the React application using JSX.

The wave's width will scale to fit the parent container.

Props

Fill

The fill property can be set to anything that a SVG path can accept (usually gradients or colors). Default: #FFF

Paused

The paused property controls the play state of the animation. Default: false

If set to true the wave animation will pause.

Options

The component supports a variety of options to affect how the wave is rendered.

Any omitted options will be set to the default value.

  • height - Height of the wave relative to the SVG element. Default: 20
  • amplitude - Amplitude of the rendered wave. Default: 20
  • speed - Speed that the wave animation plays at. Default: 0.15
  • points - Amount of points used to form the wave. Can not be less than 1. Default: 3

Pass Through Props

Any other props such as id, className or style will be passed through to the root of the component.

Other props such as opacity or stroke will be passed to the SVG path element.

Any other elements can be passed inside the SVG component itself.

Inner `` elements can be used to add gradients, clipping paths, or masks.

Using a Gradient
javascript

  
    
      
      
    
  
Using a Clipping Path
javascript

  {/* Example adapted from https://developer.mozilla.org/en-US/docs/Web/SVG/Element/mask */}
  
    
  
Using a Mask
javascript

  
    
      
      
    
    
      
    
  

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

TypeScriptanimationcomponentreactreactjs

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架