npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mantyke/spotlight-image

v0.2.3

Published

React component for displaying images with zoom, pan, and fullscreen capabilities.

Readme

@mantyke/spotlight-image

Interactive image component with zoom and pan capabilities for Mantine UI.

NPM Version NPM Downloads Bundle Size License CI PRs Welcome

Features

  • 🔍 Zoom Controls - Mouse wheel or buttons to zoom in/out
  • 🖱️ Pan & Drag - Drag image when zoomed in
  • 🖼️ Fullscreen Mode - Toggle fullscreen for immersive viewing
  • Smooth Animations - Fluid transitions and interactions
  • 🎨 Mantine Integration - Works seamlessly with Mantine theme
  • Keyboard Support - ESC to close, accessible controls
  • 📱 Responsive - Adapts to viewport size
  • 🎯 TypeScript - Full type safety and IntelliSense

Installation

# npm
npm install @mantyke/spotlight-image

# yarn
yarn add @mantyke/spotlight-image

# pnpm
pnpm add @mantyke/spotlight-image

Peer Dependencies

pnpm add @mantine/core @mantine/hooks react react-dom

Usage

import { SpotlightImage } from '@mantyke/spotlight-image';
import '@mantyke/spotlight-image/styles.css';

function Demo() {
  return (
    <SpotlightImage
      src="https://images.unsplash.com/photo-1506905925346-21bda4d32df4"
      alt="Mountain landscape"
      width={300}
      height={200}
      radius="md"
    />
  );
}

With Custom Zoom Settings

<SpotlightImage
  src="/image.jpg"
  alt="Custom zoom"
  zoomSpeed={1.5}
  maxZoom={8}
  minZoom={0.5}
/>

With Modal Props

<SpotlightImage
  src="/image.jpg"
  alt="Custom modal"
  modalProps={{
    overlayProps: {
      opacity: 0.95,
      blur: 5
    }
  }}
/>

Props

SpotlightImageProps

Extends ImageProps from @mantine/core.

| Prop | Type | Default | Description | | ------------ | ---------------------------------------------------------- | ------------ | ----------------------------- | | src | string | required | Image source URL | | alt | string | required | Alt text for accessibility | | fit | 'contain' \| 'cover' \| 'fill' \| 'scale-down' \| 'none' | 'cover' | Image fit behavior | | zoomSpeed | number | 1.2 | Zoom multiplier per step | | maxZoom | number | 5 | Maximum zoom level | | minZoom | number | 0.25 | Minimum zoom level | | modalProps | ModalProps | {} | Props passed to Mantine Modal | | width | number \| string | - | Image width | | height | number \| string | - | Image height | | radius | MantineRadius | - | Border radius |

Styles API

Selectors

  • root - Root element (clickable image)

Controls

Mouse

  • Click image - Open spotlight view
  • Mouse wheel - Zoom in/out
  • Click & drag - Pan when zoomed

Buttons

  • Zoom In - Increase zoom level
  • Zoom Out - Decrease zoom level
  • Reset - Return to fit-to-screen
  • Fullscreen - Toggle fullscreen mode
  • Close - Close spotlight

Keyboard

  • ESC - Close spotlight view

Styling

Layer Styles

For better CSS specificity control:

import '@mantyke/spotlight-image/styles.layer.css';

Custom Styles

<SpotlightImage
  src="/image.jpg"
  alt="Custom styles"
  classNames={{
    root: 'my-custom-image'
  }}
  styles={{
    root: { borderRadius: '8px' }
  }}
/>

TypeScript

Fully typed with exported interfaces:

import type { 
  SpotlightImageProps,
  SpotlightImageFactory,
  SpotlightImageStylesNames,
  SpotlightImageCssVariables
} from '@mantyke/spotlight-image';

Browser Support

  • Chrome/Edge (latest)
  • Firefox (latest)
  • Safari (latest)
  • Mobile browsers

License

MIT

Links

Keywords

mantine react image-viewer lightbox zoom pan fullscreen typescript image-zoom photo-viewer image-lightbox responsive interactive ui-component