
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
react-image-pointer
Advanced tools
A React component for creating interactive images with clickable points and information cards connected by lines
A React component for creating interactive images with clickable points and information cards connected by lines. Perfect for product showcases, educational content, and interactive documentation.
npm install react-image-pointer
# or
yarn add react-image-pointer
import { ImagenConInfo } from 'react-image-pointer';
const data = {
details: {
title: 'iPhone 16',
description: 'Latest model with advanced features'
},
points: [
{
id: 1,
x: 64.7,
y: 37,
info: {
title: 'Side Button',
description: 'Used to turn the device on/off and activate Siri'
},
link: {
title: "Learn More",
url: "https://example.com"
}
},
{
id: 2,
x: 42,
y: 20,
info: {
title: 'Camera System',
description: 'Multiple camera configuration for high-quality photos'
},
image: {
src: '/camera-detail.jpg',
alt: 'Camera Details'
}
}
]
};
function App() {
return (
<ImagenConInfo
src="/iphone-16.jpg"
itemData={data}
maxHeight="600px"
isDarkMode={false}
/>
);
}
import { useState } from 'react';
import { ImagenConInfo } from 'react-image-pointer';
function App() {
const [isDarkMode, setIsDarkMode] = useState(true);
return (
<div className={isDarkMode ? 'bg-gray-900' : 'bg-white'}>
<button onClick={() => setIsDarkMode(!isDarkMode)}>
Toggle Theme
</button>
<ImagenConInfo
src="/product-image.jpg"
itemData={productData}
isDarkMode={isDarkMode}
/>
</div>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
src | string | required | URL of the main image |
itemData | ItemData | required | Data structure containing points and details |
maxHeight | string | "600px" | Maximum height of the image |
isDarkMode | boolean | false | Enable dark mode styling |
interface ItemData {
details: {
title: string;
description?: string;
};
points: Array<{
id: number;
x: number; // Percentage from left (0-100)
y: number; // Percentage from top (0-100)
info: {
title: string;
description: string;
};
link?: {
title: string;
url: string;
};
image?: {
src: string;
alt: string;
};
}>;
}
The component uses Tailwind CSS classes. If you're not using Tailwind in your project, you'll need to include the necessary styles or override them with your own CSS.
You can override the default styles by targeting the component's classes:
/* Custom styles for info cards */
.info-card {
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 16px;
}
/* Custom styles for points */
.point {
background: #ff0000;
border: 2px solid #ffffff;
}
git checkout -b feature/amazing-feature)git commit -m 'Add some amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions or need help, please open an issue on GitHub or contact us at support@example.com.
FAQs
A React component for creating interactive images with clickable points and information cards connected by lines. Enhanced with improved modal, better performance, and enhanced interactivity.
The npm package react-image-pointer receives a total of 1 weekly downloads. As such, react-image-pointer popularity was classified as not popular.
We found that react-image-pointer 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.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.