# @gluestack-ui/fab

> A universal headless fab component for React Native, Next.js & React

Latest version **0.1.28** (published 2025-03-11) · 0 weekly downloads

## Install

```sh
npm install @gluestack-ui/fab
pnpm add @gluestack-ui/fab
yarn add @gluestack-ui/fab
bun add @gluestack-ui/fab
```

## Health

**Score 50/100 (C)** — status: stable.

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

Warnings: low downloads; pre 1.0.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 0.1.28 |
| Published | 2025-03-11 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 13 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5298 |
| Maintainers | vidhi499, rohit_singh, viraj-10, rayan1810, rajat693, surajahmedc, meenumakkar, madhavb230100, vaibhk002, daminipandey, amars29, geekgautam, sravankumarvelangi, gluestackadmin, geekashwini, mayankp06 |
| Keywords | react, native, react-native, fab, gluestack-ui, universal, headless, typescript, component, android, ios, nextjs |

## Links

- npm: https://www.npmjs.com/package/@gluestack-ui/fab
- Repository: https://github.com/gluestack/gluestack-ui
- Homepage: https://github.com/gluestack/gluestack-ui/tree/main/packages/unstyled/fab#readme
- Issues: https://github.com/gluestack/gluestack-ui/issues
- npm.io page: https://npm.io/package/@gluestack-ui/fab

## Dependencies (3)

- [@gluestack-ui/utils](https://npm.io/package/@gluestack-ui/utils.md) ^0.1.15
- [@react-native-aria/focus](https://npm.io/package/@react-native-aria/focus.md) ^0.2.9
- [@react-native-aria/interactions](https://npm.io/package/@react-native-aria/interactions.md) 0.2.16

## 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

- 0.1.28 (latest) — 2025-03-11
- 0.1.27 — 2025-03-03
- 0.1.26 — 2025-02-19
- 0.1.25 — 2025-02-18
- 0.1.24 — 2025-02-18
- 0.1.23 — 2025-02-18
- 0.1.22 — 2024-11-11
- 0.1.21 — 2024-07-08
- 0.1.20 — 2024-03-21
- 0.1.19 — 2024-03-18
- 0.1.18 — 2024-02-12
- 0.1.17 — 2023-10-20
- 0.1.16 — 2023-10-19
- 0.1.15 — 2023-10-19
- 0.1.14 — 2023-10-17
- … 15 more at https://npm.io/package/@gluestack-ui/fab/versions

## README

# `@gluestack-ui/fab`

The Floating Action Button (FAB) is a dynamic button that stays visible and provides access to a primary action throughout the user's journey in the application. It is a powerful UI element that adds a touch of elegance and convenience to the user experience.

## Installation

To install the component, run the following command in your terminal. This will add the component to your project's dependencies and allow you to use it in your project.

```sh
npm install @gluestack-ui/fab
```

## Usage

Default styling of all these components can be found in the components/core/fab file. For reference, you can view the [source code](https://github.com/gluestack/gluestack-ui/blob/main/example/storybook/src/ui-components/Fab/styled-components/index.tsx) of the styled Fab components.

```jsx
// import the styles
import { Root, Label } from '../components/core/fab/styled-components';
// import the createFab function
import { createFab } from '@gluestack-ui/fab';
// Understanding the API
const Fab = createFab({
  Root,
  Label,
});
// Using the fab component
export default () => (
  <Fab>
    <FabLabel />
  </Fab>
);
```

More guides on how to get started are available
[here](https://ui.gluestack.io/docs/).

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