# rn-tagscroll

> React Native Component for making Tag Scroll

Latest version **1.0.2** (published 2020-02-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install rn-tagscroll
pnpm add rn-tagscroll
yarn add rn-tagscroll
bun add rn-tagscroll
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2020-02-08 |
| First published | 2020-02-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Rully Ardiansyah |
| Maintainers | devoresyah |
| Keywords | tag, scroll, react-native, rn-tagscroll, tagscroll |

## Links

- npm: https://www.npmjs.com/package/rn-tagscroll
- Repository: https://github.com/DeVoresyah/rn-tagscroll
- Homepage: https://github.com/DeVoresyah/rn-tagscroll#readme
- Issues: https://github.com/DeVoresyah/rn-tagscroll/issues
- npm.io page: https://npm.io/package/rn-tagscroll

## Alternatives

- [@lexical/table](https://npm.io/package/@lexical/table.md) — 3.0M weekly downloads
- [mantine-datatable](https://npm.io/package/mantine-datatable.md) — 98.2K weekly downloads
- [react-native-collapsible-tab-view](https://npm.io/package/react-native-collapsible-tab-view.md) — 70.6K weekly downloads
- [@handsontable/vue3](https://npm.io/package/@handsontable/vue3.md) — 16.1K weekly downloads
- [vuewordcloud](https://npm.io/package/vuewordcloud.md) — 7.2K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2020-02-08
- 1.0.1 — 2020-02-08

## README

<p align="center">
    <img src="https://i.imgur.com/P9hO3RL.gif" width="141" height="250">
</p>

## Installation
```
npm install --save rn-tagscroll
```
## Usage
### Example
```jsx harmony
import React, { Component } from 'react'
import RNTagScroll from 'rn-tagscroll'

export default Example extends Component {
  constructor(props) {
    super(props)

    this.state = {
      list: [{
        id: 0,
        name: 'All'
      }, {
        id: 1,
        name: 'Lorem'
      }, {
        id: 2,
        name: 'Ipsum'
      }, {
        id: 3,
        name: 'Dolor'
      }, {
        id: 4,
        name: 'Sit'
      }, {
        id: 5,
        name: 'Amet'
      }],
    
      selected: {
        id: 0,
        name: 'All'
      }
    }
  }

  onSelect = (selected) => {
    this.setState({ selected })
  }

  render() {
    const { list, selected } = this.state

    return (
      <RNTagScroll
        showScroll={true}
        list={list}
        selected={selected}
        showEmptyState={false}
        onItemPress={this.onSelect.bind(this)}
      />
    )
  }
}
```

| Prop                                 | Description                                                                  | Default                |
| ------------------------------------ | ---------------------------------------------------------------------------- | ---------------------- |
| **`contentContainerStyle`**          | Style for container tag scroll                                               | `default styles`       |
| **`showEmptyState`**                 | Render empty state if no list                                                | `false`                |
| **`emptyStateStyle`**                | Style for empty state                                                        | `default styles`       |
| **`emptyText`**                      | Label text for empty state                                                   | `No Data Available`    |
| **`emptyTextStyle`**                 | Style for empty label text                                                   | `default styles`       |
| **`showScroll`**                     | Show scroll indicator                                                        | `true`                 |
| **`list`**                           | Data list (`Array of Object` width key `id` and `name`)                      | `null`                 |
| **`selected`**                       | Selected item list (`Object`)                                                | `null`                 |
| **`onItemPress`**                    | When item list pressed                                                       | `undefined`            |
| **`itemWrapperStyle`**               | Style for item list wrapper                                                  | `default styles`       |
| **`selectedItemWrapperStyle`**       | Style for selected item list wrapper                                         | `default styles`       |
| **`itemTextStyle`**                  | Style for item text/label                                                    | `default styles`       |
| **`selectedItemTextStyle`**          | Style for selected item text/label                                           | `default styles`       |

---
_Source: https://npm.io/package/rn-tagscroll · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
