Interactive Hit Areas logo

Interactive Hit Areas

Organization
millionco
interactive-hit-areas

Use when interactive elements that have visual spacing between them (chart bars/columns, list rows, nav items, segmented controls, tabs, calendar cells, icon buttons, legend chips) need hover or click to respond across the whole region with no dead zones. Triggers on "dead space", "deadspace", "gap between bars/items isn't clickable", "hover flickers between items", "have to aim precisely", "hit area too small", "highlight drops out between". Covers separating the hit area from the visual area, why gap/margin/space-between creates dead zones, and the flush-target + inner-spacing fix.

Overview

Publishermillionco
Repositoryskills
Skill nameinteractive-hit-areas
Stars
34
Forks
2
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by millionco on GitHub. Read the source before you install it.

Installation

Install the Interactive Hit Areas AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/millionco/skills/tree/main/skills/interactive-hit-areas
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/millionco/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/skills/interactive-hit-areas .claude/skills/interactive-hit-areas
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Interactive Hit Areas in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Interactive Hit Areas on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Interactive Hit Areas is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Interactive Hit Areas

Separate the hit area (where pointer events land) from the visual area (what the user sees). Bugs happen when spacing is built so that the gap between items has no event handler — the pointer falls into a dead zone and hover/click does nothing or flickers.

The core rule

Visual spacing between interactive siblings must live INSIDE each hit target, never BETWEEN them.

  • WRONG: spacing via gap, space-x, or margin between the interactive elements. The space is empty DOM — no handler — so it's dead.
  • RIGHT: interactive elements sit flush (no gap), each filling its full slot and carrying the handler; the visual element inside is made narrower/inset (padding, max-width, or a centered child) so it still looks spaced.

Result: the entire region is a continuous strip of live targets, but it looks identical to the spaced design.

Symptom & detection

  • Symptom: moving the pointer slowly between two items, the highlight blinks off in the space between them, or you must aim directly at the small visual element to trigger it.
  • Detect: sweep the cursor horizontally/vertically across the whole component. If the active/hover state ever drops out while still inside the component's bounds, you have dead zones.
  • The bigger the visual gap, the bigger the dead zone — so "nice airy spacing" makes it worse.

The fix (general)

  1. Identify the repeating slot (one item's full share of the axis — its pitch).
  2. Make the interactive container fill that whole slot, flush against its neighbors (remove gap/space-*/margin between siblings; use flex-1/equal grid tracks).
  3. Put the handler (onMouseEnter, onClick, :hover) on that full-slot container.
  4. Recreate the visual spacing inside: center a narrower visual element (max-width, fixed width + items-center), or use padding on the container around full-bleed content. Padding is part of the element, so it stays a live target; margin/gap is not.

React / Tailwind specifics

  • Replace gap-N between hover/click items with gap-0 (flush) and move the spacing inside each item (padding, or a centered child with max-w-[Npx]).
  • Keep sibling rows that must stay column-aligned (e.g. bars and their labels/icons) on the same gap setting — if one row is flush and another has gap, their centers drift apart. Flush + flex-1 on both keeps centers aligned.
  • For lists/menus: put vertical rhythm as py-* on each row, not as space-y-* / gap-* between rows, when the whole row strip should be clickable.
  • Accessibility tie-in: this is also how you hit the 24–44px minimum target size — grow the hit area with padding while keeping the glyph small.

Worked example (bar chart)

Spaced bars where hovering anywhere over a bar's column highlights it:

tsx
// Container: flush columns, NO gap — the whole width is live.
<div className="absolute inset-0 flex items-stretch">
  {bars.map((bar, i) => (
    <div
      key={bar.id}
      // flex-1 = one full slot/pitch; full height = hover above the bar too
      className="flex flex-1 flex-col items-center justify-end"
      onMouseEnter={() => setHovered(i)}
      onMouseLeave={() => setHovered(null)}
      style={{ opacity: hovered !== null && hovered !== i ? 0.4 : 1 }}
    >
      <span>{bar.value}</span>
      {/* visual spacing comes from the narrower CENTERED bar, not a gap */}
      <div className="w-full" style={{ maxWidth: 37, height: bar.value * UNIT }} />
    </div>
  ))}
</div>

Anti-pattern that caused the bug: flex ... gap-2 with w-full bars. The bars touched their slots, so the only spacing was the 8px gap between columns — and that gap was dead to the pointer.

When gaps between items ARE fine

Dead zones only matter when you want "anywhere in the region targets the nearest item." If items are meant to be discrete and the space between them is genuinely inert (e.g. cards on a page, unrelated buttons), gap is correct — don't force flush layouts everywhere. Apply this skill when the design intends a continuous interactive band with visual separation.

Frequently asked questions

What does the Interactive Hit Areas AI skill do?

Use when interactive elements that have visual spacing between them (chart bars/columns, list rows, nav items, segmented controls, tabs, calendar cells, icon buttons, legend chips) need hover or click to respond across the whole region with no dead zones. Triggers on "dead space", "deadspace", "gap between bars/items isn't clickable", "hover flickers between items", "have to aim precisely", "hit area too small", "highlight drops out between". Covers separating the hit area from the visual area, why gap/margin/space-between creates dead zones, and the flush-target + inner-spacing fix.

Why use Interactive Hit Areas on TypingMind?

Because you install it once and use it with any model. Interactive Hit Areas is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Interactive Hit Areas in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/millionco/skills/tree/main/skills/interactive-hit-areas. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Interactive Hit Areas?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Interactive Hit Areas?

As many as you like. As long as a model supports skills, you can use Interactive Hit Areas with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Interactive Hit Areas AI skill free?

Yes. It is published on GitHub by millionco under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇