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

@atom-design-mog/input

v1.0.1

Published

A React Native Input component supporting text, select, multiselect, chips, and search.

Downloads

10

Readme

@atom-design-mog/input

A fully customizable, multi-type Input component for React Native. Supports text, select, multiselect, selectWithSearch, chips, withButton, and more with a clean UI and flexible props.


📦 Installation

Install with npm:

npm install @atom-design-mog/input

Or with yarn:

yarn add @atom-design-mog/input

🚀 Usage

import Input from '@atom-design-mog/input';

// Simple text input
<Input
  type="text"
  label="Your Name"
  placeholder="Enter name"
  value={textValue}
  onChangeText={setTextValue}
/>

✨ Supported Input Types

  • text — Normal text input
  • select — Dropdown select (single)
  • multiselect — Multi-select dropdown
  • selectWithSearch — Select with searchable options
  • chips — Add/remove dynamic chips
  • withButton — Input with inline button

🧩 Features Preview

  • Left / right icon support (emoji-based by default)
  • Placeholder, label, and error display
  • Modal-based dropdowns with search and multi-select footer
  • Chips UI with add/remove callbacks
  • Fully controlled via value and onChangeText

📘 Basic Examples

Text input

<Input
  type="text"
  label="Search"
  leftIcon="search"
  placeholder="Search..."
  value={searchValue}
  onChangeText={setSearchValue}
/>

Select dropdown

<Input
  type="select"
  label="Select a fruit"
  placeholder="Choose"
  options={[{ label: 'Apple', value: 'Apple' }, { label: 'Banana', value: 'Banana' }]}
  value={selectValue}
  onChangeText={setSelectValue}
/>

Chips input

<Input
  type="chips"
  label="Tags"
  chips={chips}
  onAddChip={handleAddChip}
  onRemoveChip={handleRemoveChip}
/>

With button

<Input
  type="withButton"
  label="Enter OTP"
  placeholder="OTP"
  value={otp}
  onChangeText={setOtp}
  buttonProps={{ title: 'Verify', onPress: () => verifyOtp(otp) }}
/>

📋 Props Reference

| Prop | Type | Description | | -------------- | ------------ | -------------------------------------------------------- | | type | string | Defines component type (text, select, chips, etc.) | | placeholder | string | Placeholder text | | value | string/array | Input value | | onChangeText | function | Callback on change | | disabled | boolean | Disables input | | leftIcon | string | Built-in emoji icon | | rightIcon | string | Built-in emoji icon | | options | array | For select/multiselect | | buttonProps | object | Props for inline button (type = withButton) | | label | string | Top label | | error | string | Error message | | chips | array | Initial chip values | | onAddChip | function | Add new chip | | onRemoveChip | function | Remove chip |


🧪 Full Test Screen (Copy/Paste to Test)

import React, { useState } from 'react';
import { View, ScrollView } from 'react-native';
import Input from '@atom-design-mog/input';

export default function TestInputsScreen() {
  const [textValue, setTextValue] = useState('');
  const [searchValue, setSearchValue] = useState('');
  const [selectValue, setSelectValue] = useState('');
  const [multiselectValue, setMultiselectValue] = useState([]);
  const [withButtonValue, setWithButtonValue] = useState('');
  const [chips, setChips] = useState(['Chip 1', 'Chip 2']);
  const [selectWithSearchValue, setSelectWithSearchValue] = useState([]);

  const options = [
    { label: 'Option 1 - Apple', value: 'Apple' },
    { label: 'Option 2 - Banana', value: 'Banana' },
    { label: 'Option 3 - Cherry', value: 'Cherry' },
    { label: 'Option 4 - Strawberry', value: 'Strawberry' },
    { label: 'Option 5 - Peach', value: 'Peach' },
  ];

  const handleAddChip = (chip) => {
    const trimmed = chip.trim();
    if (trimmed && !chips.includes(trimmed)) setChips(prev => [...prev, trimmed]);
  };

  const handleRemoveChip = (chip) => setChips(prev => prev.filter(c => c !== chip));

  return (
    <ScrollView style={{ flex: 1 }}>
      <View style={{ padding: 20, gap: 20 }}>
        <Input type="text" label="Normal Input" placeholder="Enter text" value={textValue} onChangeText={setTextValue} />
        <Input type="text" label="Disabled Input" placeholder="Disabled" disabled />
        <Input type="text" label="Search Input" leftIcon="search" placeholder="Search..." value={searchValue} onChangeText={setSearchValue} />
        <Input type="select" label="Select Dropdown" placeholder="Select an option" options={options} value={selectValue} onChangeText={setSelectValue} />
        <Input type="multiselect" label="Multiselect" placeholder="Multi select" options={options} value={multiselectValue} onChangeText={setMultiselectValue} />
        <Input type="select" label="Select with Error" placeholder="Select value" options={options} error="You must select a value" />
        <Input type="chips" label="Chips" chips={chips} onAddChip={handleAddChip} onRemoveChip={handleRemoveChip} />
        <Input type="withButton" label="Input + Button" value={withButtonValue} onChangeText={setWithButtonValue} buttonProps={{ title: 'Submit', onPress: () => console.log(withButtonValue) }} />
        <Input type="selectWithSearch" label="Select with Search" options={options} value={selectWithSearchValue} onChangeText={setSelectWithSearchValue} />
      </View>
    </ScrollView>
  );
}

👤 Author

Avi Gupta