npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mdui-in-react

v1.2.21

Published

A react UI Library Based on mdui. It encapsulates the built-in components of mdui (including callback events), and adds some practical extension components.

Downloads

63

Readme

mdui-in-react


<Input
    onValueChange={newText=>{
        this.setState({inputText:newText})
    }}
    value={inputText}
    header="输入内容"
    icon="link"
    error="这是一个可选的错误信息"
    type="number"
/>

Mdui in react is a react UI Library Based on mdui. It encapsulates the built-in components of mdui (including callback events), and adds some practical extension components.

This project is a derivative project of my website ygktool. Thanks to mdui for its excellent front-end framework!

Quick Start

Install

npm i mdui-in-react or yarn add mdui-in-react

Usage

import '../node_modules/mdui/dist/css/mdui.min.css'

<ComponentName  
    {...props}
/>

MDUI Components

输入框Input

Options

Name|type|default|description ----|----|-------|----------- icon|string|No display|The name of the material design icon to display in front of the input value|string|--|Input content onValueChange|func|--|The callback function after the value of the input box changes. The parameter is the new value rows|string|--|If it exists, it will automatically switch to the textarea label header|string|输入框|Label Text placeholder|string|null|If there is content (including space), the header will be fixed other|object|--|Other parameters that can be used for input tags, using JSX synatx

列表控制——开关ListControlCheck

Options

Name|type|default|description ----|----|-------|----------- icon|string|settings|The name of the material design icon to display in front of the litem checked|boolean|true|if check onCheckedChange|func|--|Callback function when value changes, parameter is new value title|string|开关|just as its name implies

滑块RangeInput

Options

Name|type|default|description ----|----|-------|----------- value|string|5|just as its name implies onValueChange|string|text|Callback function when value changes, the parameter is new value title|string|调节|just as its name implies other|object|--|Other parameters that can be used for input[type='range'] tags(Such as max step..), using JSX synatx.

下拉选择Select

You need to pass in an array similar to the following as the item to be selected.Value is usually used as an identifier

[{    
    name:'通用物体和场景',    
    value:'normal'    
}, {    
    name:'动物',    
    value:'animal'    
}]

Options

Name|type|default|description ----|----|-------|----------- options|[object]|--|Items to be selected value|number|--|Value corresponding to the selected item onOptionChange|func|--|The callback function after the option is modified. The parameter is the value corresponding to the selected item

Extended components

音频播放器MusicPlayer

Accept a blob link as a prop, support adjusting progress / pause / play / download

options

Name|type|default|description ----|----|-------|----------- audio|blob|--|Audio source title|string|音频播放器|A title in the top left corner of card subtitle|string|--|A subtitle in the top left corner of card cover|string|https://s4.music.126.net/style/web2/img/default/default_album.jpg|A img in the left of card other|object|--|Other parameters that can be used for audio tags, using JSX synatx.

颜色选择器ColorInput

The color selector beautifies the input[type= "color"] tag as a block level button with color blocks.

options

Name|type|default|description ----|----|-------|----------- value|string|--|color value text|string|"选择颜色"|标题文字 onColorChange|func|--|The callback function after modifying the color. The parameter is the color value other|object|--|Other parameters that can be used for input[type='color'] tags, using JSX synatx.

回顶按钮ToTop

When the screen is more than 148px away from the top, it will automatically appear in the lower left corner. After clicking, the screen will smoothly scroll to the top.

options

Nothing....

对话框菜单选择ListControlMenu

A list item, click to display a dialog box containing the items to be selected. You need to pass in an array similar to 下拉选择

Optinos

Name|type|default|description ----|----|-------|----------- items|array|--|Items to be selected checked|number|--|Array subscript corresponding to the selected item onCheckedChange|func|--|The callback function after modifying the option. The parameter is value attribute title|string|"请选择"|标题文字 icon|string|settings|The name of the material design icon to display in front of the input

Related resources

About

The author is a senior one student

License