Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

tailwind-hitslop

Latest version: v0.2.4

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: jubstaa
11 Stars
0 Forks
2 Versions
6.8K Downloads
TypeScript Repo language

Scan summary

tailwind-hitslop was last scanned on 28 Nov 2026 at version 0.2.4. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published within 2 days (27 and 28 Nov 2026).
  • Findings: No rules fired in version 0.2.4.
  • Downloads: 6,760 downloads.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.4 LATEST 28 Nov 2026 No rules fired
0.2.3 27 Nov 2026 No rules fired

No rules fired in 0.2.4

Findings

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.

README

The publisher’s own README, as collected from the registry.

tailwind-hitslop

npm ci license

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.

Live demo →

<button class="pointer-coarse:hit-slop-2">
    <x-icon class="size-4" />
</button>

Install

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.

Why

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.

API

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>
Theme tokens (optional)

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.

Touch-first setup (optional)

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.

How much slop, when?

  • 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.

Gotchas (read this)

  1. Ancestor overflow: hidden clips the slop silently. Cards, modals and scroll containers are the usual suspects. Toggle hit-slop-debug and look.
  2. The main family uses ::before. If your element already uses ::before (icon fonts, rings, gradients), switch to the hit-slop-after-* family. Both families coexist on one element.
  3. Adjacent slops overlap. DOM order decides who wins the overlap zone. In dense layouts use hit-slop-1 and keep real spacing between targets.
  4. This does not make WCAG audits pass — but it won't break them either. Target-size checks (2.5.8 AA = 24px, 2.5.5 AAA = 44px) measure the rendered box; hit-slop only adds an invisible pointer area, so it's purely additive — it won't make a too-small target pass, nor a compliant one fail. Size the visible target for compliance (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.
  5. pointer-events-none on the host disables the slop too — by design, so disabled buttons don't keep ghost tap areas.

Prior art

Sponsorship

If this saved you from hand-rolling pseudo-element tap targets again, you can support the work on GitHub Sponsors or Buy Me a Coffee.

License

MIT © İlker Balcılar

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm tailwind-hitslop

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Vulnerability Insights

OpenSSH Password Authentication Bypass on Alpine Linux (*sshole) – CVE-2026-123158

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229