
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
@majlxrd/inpost-geowidget-next
Advanced tools
A lightweight and simple React component for integrating the official InPost GeoWidget v5 into your React and Next.js applications.
This component handles the dynamic loading of the required InPost scripts and stylesheets, providing a clean and straightforward way to display the parcel locker map.
layout.js/ts.onPointSelect) and API readiness (onApiReady)."use client"; directive).language, config, and sandbox mode.You can install the package using npm or yarn.
Using npm:
npm install @majlxrd/inpost-geowidget-next
Using yarn:
yarn add @majlxrd/inpost-geowidget-next
Here's a basic example of how to use the InpostGeowidget component in a Next.js 13+ application.
// app/page.tsx
"use client"; // This is required for components with hooks and event listeners in Next.js App Router.
import React, {useState} from 'react';
import InpostGeowidget, {InpostGeowidgetProps} from '@majlxrd/inpost-geowidget-next';
export default function HomePage() {
const [selectedPoint, setSelectedPoint] = useState<any>(null);
const handlePointSelect: InpostGeowidgetProps['onPointSelect'] = (point) => {
console.log("Parcel locker selected:", point);
setSelectedPoint(point);
};
const handleApiReady: InpostGeowidgetProps['onApiReady'] = (api) => {
console.log("GeoWidget API is ready:", api);
// You can now use the API, for example: api.openMap();
};
return (
<main style={{padding: '2rem', textAlign: 'center'}}>
<h1>Select an InPost Parcel Locker</h1>
{/* The container MUST have a defined width and height for the widget to be visible. */}
<div style={{width: '800px', height: '500px', margin: '2rem auto', border: '1px solid #ccc'}}>
<InpostGeowidget
token="YOUR_INPOST_API_TOKEN"
sandbox={true} // Use true for testing, false for production
onPointSelect={handlePointSelect}
onApiReady={handleApiReady}
language="en"
/>
</div>
{selectedPoint && (
<div style={{marginTop: '1rem', padding: '1rem', backgroundColor: '#f0f0f0'}}>
<h3>Selected Point Details:</h3>
<p><strong>Name:</strong> {selectedPoint.name}</p>
<p>
<strong>Address:</strong> {`${selectedPoint.address_details.street}, ${selectedPoint.address_details.city}`}
</p>
</div>
)}
</main>
);
}
The InpostGeowidget component accepts the following props:
| Prop Name | Type | Default | Description |
|---|---|---|---|
token | string | (none) | Required. The unique authentication token to initialize the widget. |
identifier | string | GeoWidgetHost | A unique ID for the widget instance, useful if you have multiple widgets on the same page. |
sandbox | boolean | false | If true, the widget will use the sandbox (test) environment. |
language | 'pl', 'en', 'cz', 'sk', 'hu', 'it', 'es', 'fr' | 'pl' | The display language for the widget. |
config | string | parcelCollect | The widget's configuration mode, which determines its behavior (e.g., parcelCollect, parcelSend). |
onPointSelect | (point: any) => void | undefined | Callback function invoked when a user selects a point on the map. |
onApiReady | (api: any) => void | undefined | Callback function invoked when the widget's JavaScript API is ready for programmatic control. |
onPointSelect
This callback receives the selected point object as its only argument. You can use this to store the user's choice in your application's state.
const handleSelection = (point) => {
console.log('User selected:', point.name, point.address_details);
// Update your form state here
};
<InpostGeowidget token="..." onPointSelect={handleSelection} />
onApiReady
This callback receives the widget's API object, which you can use to control the widget programmatically.
const [widgetApi, setWidgetApi] = useState(null);
// You can now call methods like widgetApi.openMap() from a button click
<button onClick={() => widgetApi?.openMap()}>Open Map</button>
<InpostGeowidget token="..." onApiReady={setWidgetApi} />
Contributions are welcome! Please feel free to open an issue or submit a pull request if you have any improvements or bug fixes.
This project is licensed under the MIT License.
FAQs
A React/Next.js component for the InPost GeoWidget.
We found that @majlxrd/inpost-geowidget-next demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.