Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/xianjie-li/click-effect

material + win click effect
https://github.com/xianjie-li/click-effect

Last synced: 6 days ago
JSON representation

material + win click effect

Awesome Lists containing this project

README

        

## Introduce
md + windows 点击风格的实现。所有事件代理于document,支持动态创建的元素,可随意与mvvm库搭配使用。兼容手机和pc。

Md + windows Click implementation of the style. All events are delegated to the document, supporting dynamically created elements, and can be used with the mvvm library at will. Compatible with mobile phones and PCs.

## demo

[![Edit bk-click-effect (forked)](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/bk-click-effect-forked-r3k42?fontsize=14&hidenavigation=1&theme=dark)


## Install

```
yarn add @lxjx/click-effect
// or
npm install @lxjx/click-effect

// browser
src="./dist/index.umd.min.js"
```


## Example

```jsx

import ClickEffect from "@lxjx/fr-click-effect";

new ClickEffect({
/* default match className ↓ */
// effect: "m78-effect", // primary className
// disabled: "__disabled",
// disabledwinStyle: "__md", // disabled windows style effect
// disabledMdStyle: "__win" // disabled material style effect
});

// tpl


base

base

base

base

base


has block



white

only win style

only md style

disabled

red

orange

yellow

green

cyan

blue

purple

// add theme
.fr-effect.__myRed .fr-effect-ripple{
background: red;
}

red

```