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

react-detect-popup

v1.1.4

Published

텍스트 내 키워드를 감지하여 팝업으로 설명을 보여주는 React 컴포넌트

Readme

react-detect-popup

텍스트 내의 키워드를 감지하여 팝업으로 설명을 표시하는 React 컴포넌트

npm version npm downloads License: MIT GitHub stars hits

설치

npm install react-detect-popup
# or
yarn add react-detect-popup

사용법

👇 Check out the demo in the website below gwanghun.im

import { DetectPop, DictionaryProvider, Toaster } from "react-detect-popup"

function App() {
  return (
    <DictionaryProvider
      initial={{
        react: {
          description: "프론트엔드 라이브러리",
          examples: ["React Hooks", "Components"],
          category: "프레임워크",
          related: ["Vue", "Angular"],
        },
      }}
    >
      <DetectPop>react는 매우 강력한 도구입니다.</DetectPop>
      <Toaster />
    </DictionaryProvider>
  )
}

컴포넌트

DictionaryProvider

전역적으로 사전 데이터를 관리하는 컨텍스트 프로바이더입니다.

Props

  • initial: Dictionary - 초기 사전 데이터
interface Dictionary {
  [key: string]: {
    description: string
    examples?: string[]
    category?: string
    related?: string[]
    style?: KeywordStyle
  }
}

DetectPop

키워드를 감지하고 팝업을 표시하는 컴포넌트입니다.

Props

  • children: string - 검사할 텍스트
  • config: DetectPopConfig - 설정 옵션
  • className: string - 추가 스타일링을 위한 클래스
interface DetectPopConfig {
  defaultStyle?: KeywordStyle
  toastPosition?: "top" | "bottom"
  toastDuration?: number
}

interface KeywordStyle {
  backgroundColor?: string
  textColor?: string
  borderRadius?: string
  padding?: string
}

Toaster

토스트 알림을 표시하는 컴포넌트입니다. 앱의 최상위 레벨에 한 번만 추가하면 됩니다.

스타일링

이 패키지는 Tailwind CSS를 사용합니다. 사용자의 프로젝트에 Tailwind CSS가 설치되어 있어야 합니다.

요구사항

  • React 16.8.0 이상
  • React DOM 16.8.0 이상
  • Tailwind CSS 3.0.0 이상

License

This project is licensed under the MIT License - see the LICENSE file for details.