npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-form-controls

v1.0.2

Published

A highly customizable and versatile input component for React Native.

Readme

react-native-form-controls

npm version

A highly customizable input component for React Native. Date/time: uses react-native-date-picker when installed (recommended); otherwise falls back to a built-in picker. Autocomplete: built-in Google Places (pass googleApiKey).

Features

  • Text, password, textarea: Standard inputs
  • Date, time, datetime: Uses react-native-date-picker when installed (best UX); otherwise built-in modal picker
  • Autocomplete: Built-in Google Places search (pass googleApiKey; uses Places API)
  • Customizable styles: container, label, input
  • Error handling: error message and error border
  • Icons: left and right icons with actions
  • Controlled/uncontrolled: Supports value and onChangeText for all types, including date/time

Installation

Required: react-native

npm install react-native-form-controls
# or
yarn add react-native-form-controls

Optional (recommended for date/time): For the best date/time picker experience, install react-native-date-picker. The package will use it automatically when present; otherwise a built-in picker is used.

npm install react-native-date-picker
# or
yarn add react-native-date-picker

Example app

A runnable example (Expo) is in the example/ folder:

npm run build && cd example && npm install && npm start

See example/README.md for details.

Usage

import { Input, COLORS } from 'react-native-form-controls';

// Text
<Input type="text" label="Name" placeholder="Enter name" />

// Password
<Input type="password" label="Password" placeholder="Enter password" />

// Textarea
<Input type="textarea" label="Notes" placeholder="Enter notes" />

// Date (built-in picker)
<Input type="date" label="Birth date" onChangeText={(iso) => setDate(iso)} />

// Time (built-in picker)
<Input type="time" label="Time" onChangeText={(iso) => setTime(iso)} />

// Autocomplete (built-in; requires googleApiKey – Google Places API key)
<Input
  type="autocomplete"
  label="Location"
  googleApiKey="YOUR_GOOGLE_PLACES_API_KEY"
  onChangeText={(place) => console.log(place)}
/>

Use COLORS from the package to match built-in theming (e.g. labelStyle={{ color: COLORS.primary }}).

Props

| Prop | Type | Description | |------|------|-------------| | type | 'text' \| 'password' \| 'date' \| 'time' \| 'datetime' \| 'textarea' \| 'autocomplete' | Input type | | label | string | Label above the input | | error | string | Error message (shows below input and error border) | | googleApiKey | string | Required for type="autocomplete". Google Places API key. | | containerStyle | ViewStyle | Container style | | labelStyle | TextStyle | Label style | | inputStyle | TextStyle | Input style | | leftIcon | ImageSourcePropType | Left icon image source | | rightIcon | ReactNode | Right icon (e.g. eye for password) | | Plus all standard TextInput props: value, onChangeText, placeholder, etc. |

For date/time/datetime, onChangeText receives an ISO date string. For autocomplete, it receives an object with addresstext, latitude, longitude, location (e.g. city, country, state, pincode).

Publishing to npm

From the repository root:

# 1. Build the library
npm run build

# 2. Log in to npm (one-time)
npm login

# 3. Publish
npm publish

To publish a new version, update version in package.json (e.g. 1.1.1) then run npm publish again. Use npm version patch to bump the version automatically.

License

MIT