# @gluestack-ui/input

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

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

## Install

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

## 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.38 |
| Published | 2025-03-11 |
| First published | 2023-02-21 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 24.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 5303 |
| Maintainers | vidhi499, rohit_singh, viraj-10, rayan1810, rajat693, surajahmedc, meenumakkar, madhavb230100, vaibhk002, daminipandey, amars29, geekgautam, sravankumarvelangi, gluestackadmin, geekashwini, mayankp06 |
| Keywords | react, native, react-native, input, gluestack-ui, universal, headless, typescript, component, android, ios, nextjs |

## Links

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

## Dependencies (4)

- [@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
- [@gluestack-ui/form-control](https://npm.io/package/@gluestack-ui/form-control.md) ^0.1.19
- [@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.38 (latest) — 2025-03-11
- 0.1.37 — 2025-03-03
- 0.1.36 — 2025-02-19
- 0.1.35 — 2025-02-18
- 0.1.34 — 2025-02-18
- 0.1.33 — 2025-02-18
- 0.1.32 — 2024-11-11
- 0.1.31 — 2024-07-08
- 0.1.30 — 2024-06-13
- 0.1.29 — 2024-04-03
- 0.1.28 — 2024-04-03
- 0.1.27 — 2024-03-26
- 0.1.26 — 2024-03-21
- 0.1.25 — 2024-03-18
- 0.1.24 — 2024-02-12
- … 25 more at https://npm.io/package/@gluestack-ui/input/versions

## README

# @gluestack-style/input

## Installation

To use `@gluestack-ui/input`, all you need to do is install the
`@gluestack-ui/input` package:

```sh
$ yarn add @gluestack-ui/input

# or

$ npm i @gluestack-ui/input
```

## Usage

The Input component is your go-to tool for gathering user input in a sleek and user-friendly text field. Whether you're designing a simple login form or a complex search feature, this component has got you covered. Here's an example how to use this package to create one:

```jsx
import { Root, Input } from '../components/core/input/styled-components';
import { createInput } from '@gluestack-ui/input';
const InputField = createInput({
  Root,
  Input,
});
```

## Customizing the input:

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

```jsx
// import the styles
import { Root, Input } from '../components/core/input/styled-components';

// import the createInput function
import { createInput } from '@gluestack-ui/input';

//import any icon
import { searchIcon } from '@gluestack/icons';

// Understanding the API
const InputField = createInput({
  Root,
  Input,
});

// Using the input component
export default () => (
  <Input>
    <InputSlot pl="$3">
      <InputIcon as={SearchIcon} />
    </InputSlot>
    <InputInput placeholder="your text goes here..." />
  </Input>
);
```

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

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