# react-native-animated-chip

> React Native Animated Chip UI Library

Latest version **1.0.0** (published 2024-02-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-animated-chip
pnpm add react-native-animated-chip
yarn add react-native-animated-chip
bun add react-native-animated-chip
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2024-02-10 |
| First published | 2024-02-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 116.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5 |
| Author | FreakyCoder |
| Maintainers | sevvaleygul |
| Keywords | FreakyCoder, freakycoder, kuray, Kuray, react, react-native, javascript, ui-lib, rn |

## Links

- npm: https://www.npmjs.com/package/react-native-animated-chip
- Repository: https://github.com/sevvaleygul0/react-native-animated-chip
- Homepage: https://www.freakycoder.com
- Issues: https://github.com/sevvaleygul0/react-native-animated-chip/issues
- npm.io page: https://npm.io/package/react-native-animated-chip

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2024-02-10

## README

<img alt="React Native Animated Chip" src="assets/logo.png" width="1080" />

<p align="center">
  <img alt="GIF" src="assets/example.gif" width="360" />
  <img alt="Fotoğraf" src="assets/exampleImage.png" width="360" />
</p>

# Installation

Add the dependency:

```bash
npm i react-native-animated-chip
```

## Peer Dependencies

<h5><i>IMPORTANT! You need install them</i></h5>

```js
"react": ">= 16.x.x",
"react-native-reanimated": ">= 3.x.x",
```

# Usage

## 💗 Import

```jsx
import AnimatedChip from "react-native-animated-chip";
```

## ✍🏻 Example Data

```
const CHIP_DATA: ChipType[] = [
  {
    id: 1,
    text: 'Friends',
  },
  {
    id: 2,
    text: '👨‍👩‍👧‍👦 How I Met Your Mother',
  },
  {
    id: 3,
    text: 'Prison Break',
  },

];
```

## 👍🏻 Usage

```jsx
<AnimatedChip
  activeId={3}
  data={CHIP_DATA}
  onPress={(selected) => {
    console.log(selected);
  }}
/>
```

## 📱 Example Project

You can checkout the example project 🥰

Simply run

- `npm i`
- `react-native run-ios/android`

should work of the example project.

# Configuration - Props

| Property              | Type                     | Default   | Description                                                                                        |
| --------------------- | ------------------------ | --------- | -------------------------------------------------------------------------------------------------- |
| data                  | ChipType[]               | []        | An array of chip objects to display                                                                |
| activeId              | string \| number         | null      | The ID of the currently active chip                                                                |
| activeBackgroundColor | string                   | '#d4a8d6' | The background color of the active chip                                                            |
| backgroundColor       | string                   | '#EEE7D1' | The background color of inactive chips                                                             |
| activeTextColor       | string                   | '#7d3577' | The text color of the active chip                                                                  |
| buttonStyle           | ViewStyle                | {}        | Additional styles to apply to the chip button                                                      |
| contentContainerStyle | ViewStyle                | {}        | Additional styles to apply to the container of chips                                               |
| textStyle             | TextStyle                | {}        | Additional styles to apply to the chip text                                                        |
| textColor             | string                   | '#DCCA92' | The text color of inactive chips                                                                   |
| onPress               | (chip: ChipType) => void | () => {}  | A function that will be called when a chip is pressed, it receives the chip object as its argument |

## Future Plans

- [x] ~~LICENSE~~
- [ ] Add customizable animation
- [ ] Add single and multi selection feature

# Change Log

Change log will be here !

## Author

Sevval Eygul, sevvalleygull@gmail.com

## License

React Native Animated Chip is available under the MIT license. See the LICENSE file for more info.

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