Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

tiny-location-input

alanthomasdev12MIT1.0.0TypeScript support: included

Ultra-lightweight React location autocomplete input with inline styling, geonames integration, and full TypeScript support — perfect for modern UIs.

react, autocomplete, location, search, city search, location input, input component, geonames, address autocomplete, geo search, react autocomplete, custom input, lightweight, tiny, minimal, inline styles, tsx, typescript support, no-css, location selector, component, package, open data, dropdown, npm react package

readme

tiny-location-input

A tiny, customizable React location input with autocomplete using GeoNames data.

📦 Installation

npm install tiny-location-input

🚀 Usage

import LocationInput from 'tiny-location-input';

function App() {
  const handleLocationChange = (location) => {
    console.log('Selected location:', location);
  };

  return (
    <LocationInput
      onSelect={handleLocationChange}
      classNames={{ container: 'shadow-container' }}
      styles={{ input: { fontSize: '1.2rem' } }}
    />
  );
}

✨ Features

  • Inline styles with override support via props
  • Lightweight: no external CSS or dependencies
  • Fully React-compatible with TypeScript support

🛠 Props

Prop Type Description
onSelect Function Called with the selected location object
classNames Object Optional class names for each component part
styles Object Optional inline styles for each part
placeholder String Input placeholder text

📄 License

MIT