Skip to Content
Kokonut UI

IN-16InputsNew, October 22, 2026

Location Picker

Set a pickup point the way ride apps do. Drag the map under a fixed pin; it lifts off its shadow, glides onto the nearest curb, drops, and the street rolls in.

Install with
lucide-react, motion

PRONatural Date Input and more like it are in Kokonut UI Pro

Installation

Location Picker is a free, open-source React component in the Kokonut UI Inputs collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/location-picker.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/location-picker

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/location-picker.tsx.

npm install lucide-react motion

Usage

import LocationPicker from "@/components/kokonutui/location-picker";

export default function Example() {
  return <LocationPicker />;
}

Props

onConfirm
(pickup: { address: string; x: number; y: number }) => void

Called with the street address when the pickup is confirmed.

className
string

Extra classes for the root element.

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
motion^12.23.25npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.