Scan your whole stack
From OX Research Newsroom
Are you using tailwind-hitslop?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.2.4
tailwind-hitslop was last scanned on 28 Nov 2026 at version 0.2.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.2.4 LATEST | 28 Nov 2026 | No rules fired |
| 0.2.3 | 27 Nov 2026 | No rules fired |
Findings for v0.2.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.2.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Hit-slop utilities for Tailwind CSS v4 (and v3 via plugin) — invisibly expand an
element's touch area while its visual size stays exactly the same. The web
equivalent of React Native's hitSlop.
Pure CSS. Zero JavaScript. Zero config.
<button class="pointer-coarse:hit-slop-2">
<x-icon class="size-4" />
</button>
npm install tailwind-hitslop
# or
bun add tailwind-hitslop
Tailwind v4 — import the CSS (pure CSS, zero JavaScript):
@import 'tailwindcss';
@import 'tailwind-hitslop';
Tailwind v3 — register the plugin:
// tailwind.config.js
module.exports = {
plugins: [require('tailwind-hitslop')],
}
Same package name on both — the export map resolves the CSS for @import and the
plugin for require. Every utility in the table below works identically on
either version; the two small differences are noted where they apply.
Small visual targets (16px icons, dense toolbars) are miserable to tap. Making them visually bigger isn't always an option. Hit-slop expands the interactive area without touching layout — the Fitts' Law fix designers actually approve.
| Class | Effect |
|---|---|
hit-slop |
8px on all sides (--spacing(2)) |
hit-slop-<n> |
Spacing scale: hit-slop-2 = 8px, hit-slop-3.5 = 14px |
hit-slop-[10px] |
Arbitrary length |
hit-slop-t-* -r-* -b-* -l-* |
Single side |
hit-slop-x-* hit-slop-y-* |
Axis — stack freely: hit-slop-x-1 hit-slop-y-3 |
hit-slop-after, hit-slop-after-* ... |
Full mirror rendered via ::after (when your ::before is taken) |
hit-slop-debug, hit-slop-after-debug |
Visualize the expanded areas |
All utilities compose with every core variant:
<button class="pointer-coarse:hit-slop-2">touch devices only</button>
<button class="any-pointer-coarse:hit-slop-2">incl. touch laptops</button>
<button class="md:hit-slop-0 hit-slop-3">smaller on desktop</button>
Define tokens in the --hit-slop-* namespace and matching classes appear:
@theme {
--hit-slop-row: 6px;
}
<button class="hit-slop-row">…</button>
No tokens defined → no named classes generated. Numbers and arbitrary values always work.
Theme tokens are read by the CSS import (@import 'tailwind-hitslop') only. The
plugin path (Tailwind v3, or @plugin on v4) takes its values from your
theme.spacing instead, which also gives it hit-slop-px.
Utilities apply on every pointer by default — a mouse user benefits from a
forgiving click area too. If you want slop only on touch devices across your
project without repeating pointer-coarse: everywhere, define a short custom
variant once:
@custom-variant touch {
@media (any-pointer: coarse) {
@slot;
}
}
<button class="touch:hit-slop-2">only when a coarse pointer exists</button>
any-pointer: coarse also covers touchscreen laptops; use pointer: coarse
instead if you only care about touch-primary devices.
hit-slop-1 (4px) — dense, adjacent targets (toolbars, list rows with
multiple actions). Keep slops from overlapping neighbors.hit-slop-2 (8px) — the default. Isolated buttons, icon buttons, chips.hit-slop-3 (12px) — a lone action in a row (a single ✕ in a card
corner, a standalone toggle).Wrap in pointer-coarse: unless you want it on mouse users too.
overflow: hidden clips the slop silently. Cards, modals and
scroll containers are the usual suspects. Toggle hit-slop-debug and look.::before. If your element already uses
::before (icon fonts, rings, gradients), switch to the hit-slop-after-*
family. Both families coexist on one element.hit-slop-1 and keep real spacing between targets.min-h-6 min-w-6 for AA, min-h-11 min-w-11
for AAA), then layer hit-slop on top for tap comfort. They compose cleanly.pointer-events-none on the host disables the slop too — by design,
so disabled buttons don't keep ghost tap areas.hitSlop — the namesakeIf this saved you from hand-rolling pseudo-element tap targets again, you can support the work on GitHub Sponsors or Buy Me a Coffee.
MIT © İlker Balcılar
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.