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

@tour-kit/hints

v0.12.0

Published

React feature hints, hotspots & beacons — pulse-animated indicators with dismissal tracking, works with or without Tailwind.

Readme

@tour-kit/hints

React feature hints, hotspots & beacons — pulse-animated indicators with dismissal tracking, works with or without Tailwind.

npm version npm downloads bundle size types license

Persistent feature hints, hotspots, and beacons for React — pulse-animated indicators that draw attention to a single UI element. Each hint has independent open/dismissed state tracked in storage, so users see it until they engage with it.

Use this for: "new feature" badges, contextual coachmarks, single-element tooltips, feature discovery pulses, callouts on a button or menu item.

Don't use this for: sequential onboarding — that's @tour-kit/react.

Alternative to: Pendo guides, Userpilot hotspots, Appcues pins, Shepherd.js hints, hand-rolled tooltip + pulse patterns.

Features

  • Pulsing hotspot + tooltip composed independently
  • Headless variants with render props — full UI control
  • Dismissal persisted via storage adapter (localStorage by default)
  • hide() vs dismiss() — temporary close vs permanent
  • Floating UI positioning — collision-aware fallback placements
  • Tailwind plugin at @tour-kit/hints/tailwind
  • TypeScript-first, supports React 18 & 19
  • < 5 KB gzipped

Installation

npm install @tour-kit/hints
# or
pnpm add @tour-kit/hints

Quick Start

import { HintsProvider, Hint } from '@tour-kit/hints'

function App() {
  return (
    <HintsProvider>
      <Hint
        id="feature-hint"
        target="#new-feature"
        content="Click here to try our new feature!"
      />
    </HintsProvider>
  )
}

Or compose hotspot + tooltip manually:

import { HintsProvider, HintHotspot, HintTooltip } from '@tour-kit/hints'

<HintsProvider>
  <HintHotspot hintId="feature-x">
    <HintTooltip>
      Try our new dashboard feature!
    </HintTooltip>
  </HintHotspot>
</HintsProvider>

i18n & interpolation

All user-facing strings in @tour-kit/hints accept the {{var | fallback}} interpolation grammar from @tour-kit/core. Wrap your tree in <LocaleProvider> and every hint title and content body resolves automatically.

import { LocaleProvider } from '@tour-kit/core'
import { HintsProvider, Hint } from '@tour-kit/hints'

<LocaleProvider locale="en" messages={{ 'hint.beta': 'Try {{feature.name | this beta feature}}!' }}>
  <HintsProvider>
    <Hint id="beta-hint" target="#beta-button" content={{ key: 'hint.beta' }} />
  </HintsProvider>
</LocaleProvider>

Full guide: https://usertourkit.com/docs/guides/i18n

Hints vs tours

| | Hints | Tours | |---|---|---| | Order | Independent | Sequential steps | | Lifetime | Until dismissed | One run-through | | State | Open / dismissed / hidden | Active step index | | Use case | "Try the new sidebar" pulse | "Walk me through onboarding" |

Tailwind CSS setup

// tailwind.config.ts
import { hintsPlugin } from '@tour-kit/hints/tailwind'

export default {
  content: [
    './src/**/*.{js,ts,jsx,tsx}',
    './node_modules/@tour-kit/hints/dist/**/*.js',
  ],
  plugins: [hintsPlugin],
}

Headless components

import { HintHeadless } from '@tour-kit/hints/headless'

<HintHeadless
  id="my-hint"
  target="#element"
  render={({ isOpen, show, hide, dismiss, targetRect }) => (
    // Full UI control
  )}
/>

Available headless components:

  • HintHeadless
  • HintHotspotHeadless
  • HintTooltipHeadless

API Reference

Components

| Export | Purpose | |---|---| | Hint | Composed hotspot + tooltip in a single component | | HintHotspot | Pulsing indicator dot (positioned over a target element) | | HintTooltip | Floating tooltip content | | HintsProvider | Context provider — registers hints, manages dismissal state |

Hooks

| Hook | Description | |---|---| | useHints() | All registered hints + dismissAll, hideAll | | useHint(id) | Single hint state + show, hide, dismiss actions | | useHintsContext() | Raw context (advanced) |

Variants (CVA)

import {
  hintHotspotVariants,
  hintTooltipVariants,
  hintCloseVariants,
} from '@tour-kit/hints'

<HintHotspot className={hintHotspotVariants({ size: 'lg', color: 'primary' })} />

Slot & UI library

import {
  Slot, Slottable,            // Radix UI primitives
  UnifiedSlot,                // Reconciles Radix + Base UI render-prop styles
  UILibraryProvider,          // Switch to Base UI
  useUILibrary,
} from '@tour-kit/hints'

Types

import type {
  HintConfig,
  HintState,
  HotspotPosition,
  HintsContextValue,
  Placement,
  HintProps,
  HintHotspotProps,
  HintTooltipProps,
} from '@tour-kit/hints'

Dismissal patterns

  • dismiss() — permanent. Stored in the persistence adapter; the hint won't reappear.
  • hide() — temporary. Closes for the current session only.
  • show() — re-open a hidden or never-shown hint.

Gotchas

  • Z-index — hotspots and tooltips need a high z-index to escape parent containers (especially modal portals).
  • Visibility check — call isElementVisible() (re-exported from @tour-kit/core) before showing a hotspot. Attaching to a hidden element is a silent failure.
  • <Hint autoShow> fires once per component instance — inline onShow handlers won't re-trigger on re-render.

Related packages

Documentation

Full documentation: https://usertourkit.com/docs/hints

License

MIT © Tour Kit Team