Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/youngjuning/vant-react-native.js.org

Lightweight React Native UI Components inspired on Vant
https://github.com/youngjuning/vant-react-native.js.org

react-native vant

Last synced: 3 days ago
JSON representation

Lightweight React Native UI Components inspired on Vant

Awesome Lists containing this project

README

        

# `vant-react-native`

[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/) [![MIT License](https://img.shields.io/badge/License-MIT-orange.svg)](https://opensource.org/licenses/MIT)

## Install

```sh
yarn add vant-react-native
```

Or

```sh
npm install vant-react-native
```

## Usage

```tsx
import React, { Component } from 'react';
import { View, Text, SafeAreaView, ScrollView } from 'react-native';
import { Icon } from 'vant-react-native';

type IconNameType = React.ComponentProps['name'];

export default class IconList extends Component {
render() {
return (



{data.map((item, index) => {
const paddingLength = data.length % 4 || 4;
return (


{item}

);
})}



);
}
}

const data: IconNameType[] = [
'location-o',
'like-o',
'star-o',
'phone-o',
'setting-o',
'fire-o',
'coupon-o',
'cart-o',
'shopping-cart-o',
'cart-circle-o',
'friends-o',
'comment-o',
'gem-o',
'gift-o',
'point-gift-o',
'send-gift-o',
'service-o',
'bag-o',
'todo-list-o',
'balance-list-o',
'close',
'clock-o',
'question-o',
'passed',
];
```

## Debug

```sh
# 构建所有包
$ yarn build
# 调试要开发的包
$ yarn workspace @vant-react-natives/button run dev
```