rc-dice
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

rc-dice

A 3D dice using CSS3 animation.

screenshot

安装 Install

npm install rc-dice -S
# or with yarn
yarn add rc-dice

示例 Usage

Example: https://codesandbox.io/s/rc-dice-rgzjb

基本 Basic

import Dice from 'rc-dice'

const App = () => {
  const defaultValue = 3
  return (
    <Dice defaultValue={defaultValue} onFinish={(value) => console.log(value)} />
  );
};

API

参数 Props

名称 Name 类型Type 描述 Description
defaultValue number 初始值,默认1
onFinish (value) => void 结束回调 callback

Readme

Keywords

Package Sidebar

Install

npm i rc-dice

Weekly Downloads

0

Version

1.0.3

License

MIT

Unpacked Size

12.3 kB

Total Files

3

Last publish

Collaborators

  • hollton