# react-native-floating-tag-button

> a ready-to-use floating button component with animated tags

Latest version **2.0.0** (published 2026-08-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-native-floating-tag-button
pnpm add react-native-floating-tag-button
yarn add react-native-floating-tag-button
bun add react-native-floating-tag-button
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-08-09 |
| First published | 2022-08-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 67.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Marinos33 |
| Maintainers | marinos33 |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/react-native-floating-tag-button
- Repository: https://github.com/Marinos33/react-native-floating-tag-button
- Homepage: https://github.com/Marinos33/react-native-floating-tag-button#readme
- Issues: https://github.com/Marinos33/react-native-floating-tag-button/issues
- npm.io page: https://npm.io/package/react-native-floating-tag-button

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-08-09
- 1.0.6 — 2022-08-05
- 1.0.5 — 2022-08-05
- 1.0.4 — 2022-08-05
- 1.0.3 — 2022-08-05
- 1.0.1 — 2022-08-05

## README

# react-native-floating-tag-button

[![NPM Status](https://img.shields.io/npm/dm/react-native-floating-tag-button.svg?style=flat-square)](https://www.npmjs.com/package/react-native-floating-tag-button)

![Desktop 05-08-22 14-52-07](https://user-images.githubusercontent.com/51862073/183081576-4b0aec57-d72c-4af1-a12e-370ef4167f9e.gif)


A floating button with animated tags that you can add to.

## Installations

```
npm install react-native-floating-tag-button --save
yarn add react-native-floating-tag-button
```

## Usage

```js
import { TagSource, TagButton } from 'react-native-floating-tag-button';

const data: TagSource[] = [
   { value: 'Tag 1', label: 'test 1' },
   { value: 'Tag 2', label: 'test 2' },
   { value: 'Tag 3', label: 'test 3' },
];

const onSelect = (selectedTag: string[]) => {
   //do something with selectedTag
};

<TagButton
  dataSource={data}
  onTagSelected={onSelect}
  icon={
    <Ionicons
      name="menu"
      size={24}
      color="white"
      style={{ backgroundColor: 'blue', borderRadius: 180, padding: 10 }}
    />
  }
  position={{ bottom: 15, right: 15 }}
  tagContainerStyle={{
    backgroundColor: 'red',
    marginRight: 10,
  }}
  textStyle={{ color: 'yellow', fontSize: 14 }}
  activeTagContainerStyle={{ backgroundColor: 'green' }}
  activeTextStyle={{ color: 'white' }}
  tintColor="black"
  touchableOpacity />
```
### Properties

| Prop                                 | Description                                                                                                                    | Type                                                                 | Default                                                                                                 | Is Required  |
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------| ---------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|--------------|
| **`dataSource`**                     | the tags to display and use.                                                                                                   | `TagSource[]`                                                        |`[]`                                                                                                     | yes          |
| **`onTagSelected`**                  | the callback method when a tag is selected.                                                                                    | `(tags: string[]) => void`                                           |`none`                                                                                                   | yes          |
| **`icon`**                           | the element to display as the floating button to hide and show the tags. the element can be an icon, a text, an image, etc.    | `JSX.Element`                                                        |`none`                                                                                                   | yes          |
| **`sortTags`**                       | if true, the tags will be sorted alphabetically.                                                                               | `boolean`                                                            |`false`                                                                                                  | no           |
| **`position`**                       | an object to define the position of the button on the screen.                                                                  | `{ top?: number; left?: number; right?: number; bottom?: number; } ` |`{ bottom: 10, right: 5 }`                                                                               | no           |
| **`direction`**                      | define the direction of the alignement between the floating button and his tags.                                               | `'row' \| 'row-reverse' \| 'column' \| 'column-reverse'`             |`column`                                                                                                 | no           |
| **`tagContainerStyle`**              | the style of the container of the tags.                                                                                        | `StyleProp<ViewStyle>`                                               |`{ backgroundColor: '#787878', borderRadius: 180, width: 75 }`                                           | no           |
| **`textStyle`**                      | the style of the labels of the tags.                                                                                           | `StyleProp<TextStyle>`                                               |`{ color: '#ffffff', fontSize: 14 }`                                                                     | no           |
| **`activeTagContainerStyle`**        | the style of the container of the tags when selected.                                                                          | `StyleProp<ViewStyle>`                                               |`{ backgroundColor: 'white', paddingHorizontal: 8, paddingVertical: 4, borderRadius: 4, borderWidth: 1 }`| no           |
| **`activeTextStyle`**                | the style of the labels of the tags when selected.                                                                             | `StyleProp<TextStyle>`                                               |`{ color: '#333' }`                                                                                      | no           |
| **`tintColor?`**                     | the color of the border of the tags.                                                                                           | `string`                                                             |`00a8ff`                                                                                                 | no           |
| **`touchableOpacity?`**              | if true, the tags will use a touchable opacity as clickable component, otherwise they will use a touchable without feedback.   | `boolean`                                                            |`false`                                                                                                  | no           |
| **`animationDuration?`**             | the duration of the animation when the tags are shown.                                                                         | `number`                                                             |`200`                                                                                                    | no           |

A complete minimal example can be found [Here](example/src/Home.tsx).

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository.

## License

MIT

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