Free, open-source location picker component for shadcn-ui
Built with React, TypeScript, Tailwind CSS, shadcn-ui, and Google Maps API
Allows users to select locations via map or search
Integrates via shadcn CLI with autocomplete and place details
MIT-licensed, designed for seamless form integration
React Router is a free, open-source React component by brielov, designed to extend shadcn-ui with a Google Maps-powered location picker. It’s ideal for developers building forms requiring location input, such as delivery apps, event planners, or user profiles, within Next.js or React projects using shadcn-ui.
Built with React, TypeScript, Tailwind CSS, shadcn-ui, and the Google Maps JavaScript API, it offers an interactive map interface, autocomplete search, and place details retrieval. The component integrates via shadcn CLI, ensuring a consistent, accessible UI that aligns with shadcn-ui’s design principles.
Interactive Map: Users can click or drag to select a location on a Google Map.
Autocomplete Search: Search for places with Google Maps’ autocomplete suggestions.
Place Details: Retrieves details like address, coordinates, and place ID.
Accessible Design: Inherits shadcn-ui’s WAI-ARIA compliance for accessibility.
CLI Integration: Install via shadcn CLI for quick setup in shadcn-ui projects.
Responsive Styling: Tailwind CSS ensures adaptability across devices.
Form Integration: Works with react-hook-form and Zod for type-safe forms.
shadcn-ui Compatibility: Seamlessly matches shadcn-ui’s aesthetic and accessibility.
Free and Open-Source: MIT license allows unrestricted use and customization.
Robust Functionality: Combines map interaction with autocomplete for versatile location selection.
Easy Setup: CLI simplifies integration into shadcn-ui projects.
Developer-Friendly: TypeScript and form integration enhance development experience.
React Dependency: Limited to React/shadcn-ui ecosystems.
Google Maps API: Requires a Google Maps API key, which may incur costs for high usage.
Setup Requirements: Needs shadcn-ui, Tailwind CSS, and Google Maps API setup.
Client-Side Focus: Relies on client-side rendering for map functionality.
Limited Documentation: As a newer component, detailed guides may be sparse.
LocationPicker: Main component rendering the map, autocomplete input, and place details.
AutocompleteInput: Search input with Google Maps autocomplete suggestions.
Map: Interactive Google Maps interface for location selection.
React Router is completely free under the MIT license. Note that Google Maps API usage may incur costs based on your application’s request volume.
React: Core framework for the component.
shadcn-ui: Provides accessible, styled primitives.
Tailwind CSS: Utility-first styling for responsive design.
Next.js: Optimized for Next.js projects.
TypeScript: Ensures type safety.
Google Maps JavaScript API: Powers map rendering and autocomplete.
react-hook-form & Zod: Supports type-safe form integration.
A Google Maps-powered location picker component for shadcn-ui with map and autocomplete features.
Yes, the component is free under the MIT license, but Google Maps API usage may have costs.
It’s designed for shadcn-ui; non-shadcn-ui use requires replacing dependencies.
Highly customizable via Tailwind CSS and component props.
Submit your Shadcn product to AllShadcn, get featured, and drive genuine traffic while showcasing your work to the world. Turn your creativity into revenue and begin selling today! 🚀