CSS pointer-events Property

Beginner
6 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The pointer-events property controls whether an element can be the target of pointer input such as clicks, taps, and hovers. For HTML, you mostly use auto and none.

With none, the element is skipped in hit testing, so the pointer can reach what is behind it—handy for decorative overlays. It is inherited. Extra keywords such as fill and stroke are for SVG.

Standard-track.

Not deprecated. Baseline widely available. HTML study focus: auto and none.

SVG-only keywords HTML experimental

Values such as fill, stroke, and visiblePainted are for SVG. Treat them as experimental on HTML elements.

CSS Syntax

syntax.css
pointer-events: auto | none | initial | inherit;

For everyday HTML, start with auto and none. SVG adds more hit-testing keywords when you need fill- or stroke-only targeting.

Property Values

ValueDescriptionTry it
autoDefault. Element can receive pointer eventsTry it
noneSkip hit testing; events can pass throughTry it
none + child autoParent ignores hits; a child can still be clickedTry it
fill (SVG)Hit the fill area only (SVG shapes)Try it
initialResets to autoTry it
inheritTakes the parent’s pointer-eventsTry it

How to Use pointer-events

Decide which layers should catch the pointer, then open a path for layers underneath when needed.

  1. Leave pointer-events: auto on interactive controls (buttons, links, inputs).
  2. Set none on decorative overlays that should not block clicks.
  3. If a child inside a none parent must stay clickable, set that child back to auto.
  4. Do not use none as a substitute for disabled on form controls.
PieceRequired?Role
Target elementYesThe box whose hit testing you change
auto or noneYes (HTML)Receive events or pass them through
Stacked layoutFor click-throughSomething underneath must exist to receive the event
Child autoSometimesRe-enables hits inside a none parent

Live Preview

A translucent overlay sits on a button. Change pointer-events on the overlay and try clicking.

With none, the click reaches the button. With auto, the overlay catches it.

Stage

pointer-events: none — Clicks pass through to the button.

CSS Examples

Each snippet focuses on pointer-events. Use Try It Yourself for a live editor.

Example 1 — Click Through an Overlay

Let pointer events reach the button under a decorative layer.

CSS
<style>
  .stage {
    position: relative;
  }

  .overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
</style>

<div class="stage">
  <button type="button">Click me</button>
  <div class="overlay">Overlay</div>
</div>
Try It Yourself

How It Works

  1. Stack the layers. position: relative on the stage and absolute on the overlay put the overlay on top.
  2. Skip hit testing. pointer-events: none means the overlay is not a pointer target.
  3. Reach what is below. The browser looks through the overlay and finds the button.
  4. Keep it decorative. The overlay can still show text or color; it just does not catch clicks.

Example 2 — Overlay Blocks Clicks

Same stack. auto makes the overlay catch the pointer again.

CSS
<style>
  .stage {
    position: relative;
  }

  .overlay {
    position: absolute;
    inset: 0;
    pointer-events: auto;
  }
</style>

<div class="stage">
  <button type="button">Click me</button>
  <div class="overlay">Overlay</div>
</div>
Try It Yourself

How It Works

  1. Keep the same stack. Layout matches Example 1 so only the keyword changes.
  2. Restore hit testing. pointer-events: auto is the default receiving behavior.
  3. Top layer wins. The overlay is the pointer target, so the button never sees the click.
  4. Use when needed. Modal backdrops often stay at auto so they can dismiss the dialog.

Example 3 — Parent None, Child Auto

Pass through most of a layer, but keep one control clickable.

CSS
<style>
  .stage {
    position: relative;
  }

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

  .overlay button {
    pointer-events: auto;
  }
</style>

<div class="stage">
  <a href="#">Link below</a>
  <div class="overlay">
    <button type="button">Close</button>
  </div>
</div>
Try It Yourself

How It Works

  1. Turn the parent off. pointer-events: none on the overlay opens a path to the link below.
  2. Turn the child on. pointer-events: auto on the button makes that control a hit target again.
  3. Inheritance note. The property is inherited, so the explicit auto on the child is what re-enables it.
  4. Events can still bubble. A click on the child can bubble through the none parent during the bubble phase.

Edge Cases & Pitfalls

If clicks behave oddly, one of these is usually why.

a11y

Not a substitute for disabled

none only changes hit testing. Form controls still need the disabled attribute when they should be unavailable to assistive tech and validation.

focus

Keyboard focus is separate

A link or button can still be focused with the keyboard even when pointer-events: none blocks the mouse. Manage focus and tabindex deliberately.

inherit

It is inherited

Children pick up a parent none unless they set another value. Set auto on any child that must stay interactive.

opacity

Invisible is not the same as none

opacity: 0 or visibility: hidden can still leave an element in the hit-test path unless you also set pointer-events: none.

svg

Extra keywords are SVG-first

fill, stroke, and related values target SVG geometry. Prefer auto / none for HTML UI work.

Browser Support

pointer-events is a browser CSS property for hit testing. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available since Jul 2015

pointer-events

HTML: Chrome 4+, Firefox 3.6+, Safari 4+, Edge 12+, Opera 15+, IE 11+. SVG support is older and broader in SVG-capable browsers.

97% Modern browser support
Google Chrome 4+
Full support
Mozilla Firefox 3.6+
Full support
Apple Safari 4+
Full support
Microsoft Edge 12+
Full support
Opera 15+
Full support
Samsung Internet 4+
Full support
Internet Explorer 11+
Full support
pointer-events Widely supported

Bottom line: Safe for auto and none in current browsers, including Internet Explorer 11. Stick to those two keywords for HTML; use SVG-specific values only in SVG.

Key Takeaways

  • Role: choose whether an element can be a pointer hit target.
  • HTML values: auto (receive) and none (pass through).
  • Initial value: auto. Inherited: yes.
  • Pattern: none on overlays; auto on any child that must stay clickable.

One line: pointer-events: none makes a layer see-through to the pointer without hiding it visually.

Frequently Asked Questions

It controls whether an element can be the target of pointer input such as clicks, taps, and hovers. With none, the element is skipped in hit testing so events can reach what is behind it.
The initial value is auto. The element behaves normally and can receive pointer events.
No. none only changes hit testing. It does not mark a control as disabled for forms, validation, or accessibility. Prefer the disabled attribute on real form controls when needed.
Yes, if a child sets pointer-events: auto (or another receiving value). Events on that child can still bubble through the none parent during capture and bubble.
It mainly affects pointer hit testing. Keyboard focus still depends on the element type and tabindex. Do not use none alone as an accessibility lock.
It is Baseline and widely available since July 2015: Chrome 4+, Firefox 3.6+, Safari 4+, Edge 12+, IE 11+ for HTML. It is a browser CSS property, not a Node.js feature.

Next: position

Learn how to place elements with static, relative, absolute, fixed, and sticky.

position tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful