CSS pointer-events Property Explained

What the CSS pointer-events property does, with an example.

Published November 6, 2026

pointer-events decides whether an element can be the target of mouse or touch events. none lets clicks pass through to what's underneath.

How it works

Common for decorative overlays and disabled-looking elements. Children can opt back in with pointer-events: auto.

It does not stop keyboard interaction.

Values and effects

pointer-events: auto; → normal
pointer-events: none; → clicks pass through

Practical examples

Click-through overlay

.glow { position: absolute; inset: 0; pointer-events: none; }

Disable a link visually

.link.disabled { pointer-events: none; opacity: .5; }

Child re-enables

.overlay { pointer-events: none; }
.overlay .btn { pointer-events: auto; }

Common mistakes

  • Relying on it to disable buttons (keyboard still works).
  • Forgetting to also set aria-disabled.
  • Blocking interactions inside accidentally.

Key takeaways

  • pointer-events in one line: pointer-events decides whether an element can be the target of mouse or touch events.
  • Inspect it live in DevTools → Styles.
  • Test across browsers and screen sizes.

FAQ

Does it stop keyboard focus?

No, use the disabled attribute or tabindex=-1.

Is pointer-events supported in all browsers?

Yes in all modern browsers; check caniuse.com for edge cases.

More CSS articles