react下移动端可吸附悬浮窗,悬浮球,悬浮按钮,支持拖动拖拽功能

基于react实现的移动端的可吸附悬浮按钮

预览地址(移动端):

https://kkfor.github.io/suspend-button/

源码地址:

https://github.com/kkfor/suspend-button

安装

npm install suspend-button -S

使用

import React, { Component } from 'react'
import ReactDOM from 'react-dom'
import SuspendButton from 'suspend-button'

class App extends Component {
  render() {
    return (
      <SuspendButton></SuspendButton>
    )
  }
}

ReactDOM.render(
  <App />,
  document.getElementById('container')
)

你可能感兴趣的:(react)