https://didi.github.io/pile.js/
pile.js components build with React.
https://didi.github.io/pile.js/
pile pile-ui react ui-components
Last synced: about 2 months ago
JSON representation
pile.js components build with React.
- Host: GitHub
- URL: https://didi.github.io/pile.js/
- Owner: didi
- License: apache-2.0
- Created: 2018-04-08T02:05:15.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T18:58:27.000Z (over 2 years ago)
- Last Synced: 2024-10-11T01:36:22.957Z (9 months ago)
- Topics: pile, pile-ui, react, ui-components
- Language: CSS
- Homepage:
- Size: 11.3 MB
- Stars: 267
- Watchers: 19
- Forks: 35
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-frontend - pile.js
README
# Pile [](http://commitizen.github.io/cz-cli/) [](https://www.npmjs.com/package/pile)
A lightweight mobile components library build with [React](http://facebook.github.io/react/).
[](https://www.npmjs.com/package/pile-ui)
## Docs
[View the docs here](https://didi.github.io/pile.js/docs/)
[1.x docs](https://didi.github.io/pile.js/1.x/docs/)
## Components
Existing components of pile 2.0
| Component | Package | Author |
|---|---|---|
| **Button** | [@pile-ui/button](https://www.npmjs.com/package/@pile-ui/button) | [miaocai](https://github.com/renmm) |
| **Icon** | [@pile-ui/icon](https://www.npmjs.com/package/@pile-ui/icon) | [miaocai](https://github.com/renmm) |
| **Switch** | [@pile-ui/switch](https://www.npmjs.com/package/@pile-ui/switch) | [xilixjd](https://github.com/xilixjd) |
| **Toast** | [@pile-ui/toast](https://www.npmjs.com/package/@pile-ui/toast) | [susan](https://github.com/zhixunqiu) |
| **InputFiled** | [@pile-ui/inputFiled](https://www.npmjs.com/package/@pile-ui/inputfiled) | [hpfree](https://github.com/hpfree) |
| **Alert** | [@pile-ui/alert](https://www.npmjs.com/package/@pile-ui/alert) | [gaiazhang](https://github.com/gaiazhang) |
| **Radio** | [@pile-ui/radio](https://www.npmjs.com/package/@pile-ui/radio) | [abiaoGit](https://github.com/abiaoGit) |## Dependences
* [email protected]
* [email protected]## Installation
```
npm i pile-ui@latest --save// import css
npm i @pile-ui/theme-default
```import component
```js
// style1
import {Button} from 'pile-ui'// single component
import Button from '@pile-ui/button'
```import all css
```js
import '@pile-ui/theme-default/lib/index.min.css'
```import single css
```js
import '@pile-ui/theme-default/lib/button.min.css'
```## Example
We have several examples on the documentation. Here is the first one to get you started:
```jsx
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { Button } from 'pile-ui'
import '@pile-ui/theme-default/lib/index.min.css'class App extends Component {
render() {
return (
hello Pile
);
}
}ReactDOM.render((
), document.getElementById('container'));
```## Development
```js
git clone [email protected]:didi/pile.js.git
cd pile.js
npm install
npm start
```create new module
```
lerna create @pile-ui/xx packages
```css build
```
cd packages/theme-default
npm run build
``````bash
npm run build
```Build single package by running the following:
```bash
npm run build -- --scope "@pile-ui/button"
```Build multiple packages where scope is a glob expression:
```bash
npm run build -- --scope "{@pile-ui/button,@pile-ui/icon}"
```Watch all filters (auto-rebuild upon src changes):
```bash
npm run watch
```## Contributing
Welcome to contribute by creating issues or sending pull requests. See [Contributing Guide](.github/CONTRIBUTING.md) for guidelines.
## License
pile is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file.