1.1.9 • Published 2 years ago

canvas-design-ui v1.1.9

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

canvas-design-ui

A UI component based on canvas and react

NPM package: https://www.npmjs.com/package/canvas-design-ui

Git repo: https://github.com/talktao/canvas-design-ui

If it is helpful to you, please help me to order one on GitHub 🌟, Thanks !

Installation

With NPM

npm i canvas-design-ui

With YARN

yarn add canvas-design-ui

Usage

Read the Source luke!

目录

water-sphere

图片

import { WaterSphere } from "canvas-design-ui";

<WaterSphere
    height={180} 
    percent={78.888} 
    style={{ '--bg-color': '#f7f7f7', '--font-color': '#002EFF' }}
>
    <div>78.888%</div>
    <div style={{ fontSize: '14px' }}>占比</div>
</WaterSphere>

Props

NameDescriptionTypeDefault
heightwater-sphere canvas heightnumber160
percentPercent of the water spherenumber-
gradientColorDataWater ball gradientArray[0, '#ffffff', 0.5, '#00EDFF', 1, '#002EFF']
childrenCustomized informationReact.ReactNode-

CSS Variables

NameDescriptionDefaultGlobal
--bg-colorColor of the canvasBg#f7f7f7-
--font-colorColor of the font#002EFF-

progress-circle

图片

import { ProgressCircle } from "canvas-design-ui";

<ProgressCircle
    percent={60}
    style={{
        '--size': '180px',
        '--track-width': '12px',
        '--fill-color': '#ff8f1f',
    }}
>
    <div style={{ fontSize: '18px' }}>60%</div>
</ProgressCircle>

Props

NameDescriptionTypeDefault
percentPercent of the water spherenumber-
childrenCustomized informationReact.ReactNode-

CSS Variables

NameDescriptionDefaultGlobal
--fill-colorColor of the fill part#1677ff-
--sizeWidth and height of the canvas80px-
--track-colorColor of the track#e5e5e5-
--track-widthWidth of the line4px-

figure-code

图片

import { FigureCode } from "canvas-design-ui";

<FigureCode />

Props

NameDescriptionTypeDefault
widthwith of canvasnumber80
heightheight of canvasnumber40
onCheckReturn the value of the verification code(i:string)=>void
1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago