Socket
Book a DemoInstallSign in
Socket

mouse-art

Package Overview
Dependencies
Maintainers
0
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mouse-art

mouse click effects

1.0.8
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
0
Weekly downloads
 
Created
Source

mouse-art

一款 改变 鼠标点击和移动效果的插件。给你提供丰富的特效选择

使用

1. 安装

npm install mouse-art

2. 使用

import 'mouse-art/dist/index.css'
import mouseArt from 'mouse-art'

mouseArt({
effectType: 'love_rise'
})

3. 参数介绍

** 所有参数均为非必传。 **

effectType: 代表点击特效类型。目前可选类型如下

- text_hidden  // 点击弹出文字之后隐藏
- love_rise  // 上升的爱心
- circle_enlarge  // 圆圈放大(可搭配bgImg)
- circle_cross_explosive  // 圆圈爆炸(可搭配bgImg)
- circle_rotate_yin_yang // 太极旋转

其余参数如下:
eventType?: "mousedown" | "mouseover"; // 事件类型,鼠标点击 | 鼠标移动 默认点击事件
effectType?: string | null; // 动画类型 默认 circle_random_explosive
duration?: number; // 动画持续时间 默认 0.7s
bindEle?: HTMLElement; // 绑定的元素, 默认document
bgImg?: string; // 传递该值 自动设置背景图(请传入一个可访问url链接), 默认无
text?: string; // effectType 设置为 text_hidden 时 才有意义。弹出的文字。

Keywords

mouse

FAQs

Package last updated on 09 Jul 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.