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

@chakkun1121/react-floor-map

v1.0.2

Published

A highly interactive, accessible, and customizable React floor map component library. Designed for schools, events, shopping malls, and large facility maps.

Readme

@chakkun1121/react-floor-map

A highly interactive, accessible, and customizable React floor map component library. Designed for schools, events, shopping malls, and large facility maps.

Features

  • 🗺️ Interactive Maps: Zoom, pan, and click interactions out of the box.
  • 🏢 Multi-Floor & Multi-Building Support: Easily navigate between buildings and floors (stairs/elevators).
  • 🔍 Built-in Search: Search for rooms, landmarks, and facilities quickly.
  • 🚻 Facility Filtering: Dedicated lists for restrooms and other specific facilities.
  • Accessibility & SEO: Built-in screen reader HTML generator and Schema.org structured data generator.
  • 📱 Mobile Responsive: Works seamlessly on desktop and touch devices.

Demo & Examples

Check out the live example: https://chakkun1121.github.io/asano-map

Note: This site serves as a real-world implementation example (Asano Gakuen Unofficial Map). Please visit the Asano Gakuen Official Website for official school information.

Installation

You can install the package via npm, yarn, pnpm, or bun.

npm install @chakkun1121/react-floor-map
# or
bun install @chakkun1121/react-floor-map

Note: This library requires react, react-dom, lucide-react, motion/react, and react-markdown as peer dependencies.

Setup & Usage

1. Import Styles

You must import the library's CSS in your main entry file (e.g., main.tsx or App.tsx):

import "@chakkun1121/react-floor-map/style.css";

2. Basic Example

import React from "react";
import { FloorMapApp, MapData } from "@chakkun1121/react-floor-map";

// Define your map data
const myMapData: MapData = {
  title: "My Facility Map",
  description: "Welcome to our complex.",
  areas: [
    // Define your buildings, landmarks, floors, and rooms here
  ],
  groups: [
    // (Optional) Define tenant/club/class details that occupy specific rooms here
  ],
};

export default function App() {
  return (
    <div style={{ width: "100vw", height: "100vh" }}>
      <FloorMapApp data={myMapData} />
    </div>
  );
}

Data Structure (MapData)

react-floor-map separates the physical structure of the map (areas) from the operational layout (groups). This allows you to update the tenants or groups easily without touching the physical map coordinates.

  • Building: Represents a multi-level building. Contains multiple floors.
  • Floor: Represents a single floor. Contains an image (SVG/PNG) and physical rooms (spaces).
  • Space: Represents an individual room, restroom, or stairs. Holds coordinates {x, y} relative to the floor map image.
  • Group: Represents an organization, class, or tenant occupying one or more spaces (via spaceIds).

SEO & Accessibility

Create a static, screen-reader-friendly version of your map and inject Schema.org JSON-LD for search engines. This is completely optional but highly recommended.

import {
  generateMapStructuredData,
  generateMapScreenReaderHtml,
} from "@chakkun1121/react-floor-map/seo";
import myMapData from "./myMapData";

// Generate Schema.org JSON-LD string
const jsonLd = generateMapStructuredData(myMapData);

// Generate hidden HTML for screen readers
const a11yHtml = generateMapScreenReaderHtml(myMapData);

License

MIT