The pointer-events property controls whether an element can receive mouse clicks, touch taps, and hover events. It is especially useful for overlays, disabled-looking UI, and SVG hit areas.
01
auto
Default behavior.
02
none
Ignore clicks.
03
Overlays
Click-through layers.
04
Blocking
Loading shields.
05
SVG
Hit testing.
06
a11y
Use wisely.
Fundamentals
Introduction
The pointer-events property in CSS is used to control whether an element can be the target of pointer events, such as mouse clicks, touch events, or cursor hovers.
This property is particularly useful for creating interactive web elements and managing user interactions on your webpage.
Definition and Usage
On everyday HTML pages, you will mostly use auto and none. Set pointer-events: none when an element should look present but not capture clicks, such as a decorative label over an image link.
SVG graphics support additional values that control which painted parts of a shape can receive pointer input. That helps you keep decorative strokes visible while limiting clicks to the useful area.
💡
Beginner Tip
pointer-events: none does not remove an element from the page. It only changes which element the browser treats as the click target underneath the pointer.
Foundation
📝 Syntax
The syntax for the pointer-events property is simple and can be applied to any HTML element.
syntax.css
element{pointer-events:value;}
Here, value can be one of the predefined keywords that determine the behavior of pointer events for the element.
Basic Example
pointer-events-none.css
button{pointer-events:none;}
Syntax Rules
auto restores normal pointer interaction.
none makes the element transparent to pointer hit testing.
Events can reach elements below when the top layer uses none.
Pair visual disabled styles with the right HTML attribute when needed.
SVG supports extra values for fill, stroke, and visibility rules.
Test touch devices when building overlays and modals.
Defaults
🎯 Default Value
The default value of the pointer-events property is auto, which means that the element can be the target of pointer events as usual.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Default value
auto
Most common override
none
Applies to
All elements
Inherited
Yes
Animatable
No
Common use
Click-through overlays and non-interactive decorations
Reference
💎 Property Values
For HTML, focus on auto and none. SVG content can use the additional paint and visibility keywords below.
Value
Example
Description
auto
pointer-events: auto;
The element behaves as it would if the property were not specified. It can be the target of pointer events.
none
pointer-events: none;
The element is never the target of pointer events. All pointer events will be ignored for this element.
visiblePainted
pointer-events: visiblePainted;
SVG: events only when the element is visible and painted. Default for SVG content.
visibleFill
pointer-events: visibleFill;
SVG: events when the fill is visible.
visibleStroke
pointer-events: visibleStroke;
SVG: events when the stroke is visible.
visible
pointer-events: visible;
SVG: events when visible, for fill and/or stroke.
painted
pointer-events: painted;
SVG: events when painted, regardless of visibility.
fill
pointer-events: fill;
SVG: events when the fill is painted.
stroke
pointer-events: stroke;
SVG: events when the stroke is painted.
all
pointer-events: all;
SVG: events regardless of visibility or paint status.
autononevisiblePaintedfillstroke
Context
When Does pointer-events Matter?
pointer-events is the right tool when pointer input should be redirected or blocked:
Decorative overlays — Let clicks pass through labels sitting on top of links or cards.
Loading shields — Block interaction with a panel while data loads.
Disabled-looking UI — Stop clicks on controls that are not yet available.
SVG graphics — Limit hit areas to fills or ignore wide decorative strokes.
For true form disabling and accessibility, combine CSS with the correct HTML attributes and ARIA patterns.
Preview
👀 Live Preview
The grey button uses pointer-events: none, so it cannot be clicked. The blue button uses the default auto behavior.
pointer-events: auto
pointer-events: none
A pass-through overlay sits on top visually but does not steal clicks from the content below.
Link area
Overlay label
Hands-On
Examples Gallery
Start with the reference disabled button, build a click-through overlay, toggle a blocking shield, and refine SVG hit areas.
🖱 HTML Interaction
Use pointer-events on everyday HTML elements — matching the reference example.
Example 1 — Disabled Button
In this example, we’ll disable pointer events for a button.
pointer-events-button.html
<style>button{pointer-events:none;background-color:grey;color:white;border:none;padding:10px 20px;font-size:16px;}</style><h1>Button with Disabled Pointer Events</h1><button>Click Me</button><p>The button above cannot be clicked because pointer events are disabled.</p>
Only the rectangle is clickable; the wide decorative stroke is ignored.
How It Works
SVG shapes can have large painted areas. pointer-events lets you keep visuals rich while limiting interaction to the shapes that matter.
Companion
pointer-events vs cursor and opacity
pointer-events: none stops hit testing, but the element can still look clickable if cursor: pointer remains. Update cursor styles together with pointer rules.
opacity can make content look faded, and pairing it with pointer-events: none is a common disabled-state pattern. Remember that visibility: hidden also affects interaction differently.
A click, tap, or hover starts browser hit testing at the pointer location.
Pointer input
2
Browser checks each layer
Elements with pointer-events: none are skipped in the hit test.
Hit testing
3
The target receives the event
The top eligible element gets the click or hover, or the event reaches the layer below.
Event target
=
★
Controlled interaction
You decide which visible layers actually participate in pointer interaction.
Compatibility
Browser Compatibility
The pointer-events property is supported in all modern browsers, including the latest versions of Chrome, Firefox, Safari, Edge, and Opera. However, it is always a good practice to test your website across different browsers to ensure compatibility.
✓ HTML · SVG · Modern support
Reliable pointer-events support
Chrome, Firefox, Safari, Edge, and Opera support auto and none on HTML elements.
98%Modern browser support
Google Chrome2+ · Desktop & Mobile
Full support
Mozilla Firefox3.6+ · Desktop & Mobile
Full support
Apple Safari4+ · macOS & iOS
Full support
Microsoft Edge12+ · All versions
Full support
Opera9.5+ · Modern versions
Full support
Testing tip
Test overlays on touch screens. A pass-through label should not block taps on the link or button underneath.
pointer-events property98% supported
Bottom line:pointer-events is widely supported for HTML and SVG in modern browsers.
Wrap Up
Conclusion
The pointer-events property is a versatile tool for managing user interactions with web elements.
By using this property, you can control whether an element responds to pointer events, which is useful for creating custom interactions and enhancing user experience. Experiment with different values to see how this property can improve the interactivity of your web projects.
Use pointer-events: none on decorative overlays above links
Pair visual disabled styles with the correct HTML attributes when needed
Update cursor when interaction changes
Test click-through behavior on mobile touch devices
Use SVG values to limit hit areas on complex graphics
❌ Don’t
Rely on pointer-events: none alone for form accessibility
Hide important controls only with CSS when users still need access
Forget that inherited none affects child hit testing context
Assume keyboard focus is blocked the same way as mouse clicks
Block entire pages without clear loading or disabled feedback
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about pointer-events
Use these points when controlling clicks, taps, and hovers.
5
Core concepts
★01
auto Default
Normal clicks.
Default
⚙02
none
Ignore pointer.
Pattern
◉03
Overlays
Click-through.
Use case
▦04
SVG
Hit testing.
Context
🔒05
a11y
Use with care.
Reminder
❓ Frequently Asked Questions
pointer-events controls whether an element can be the target of pointer interactions such as clicks, taps, and hovers. With pointer-events: none, the element ignores those events and they can pass through to elements below.
The default value is auto, which means the element behaves normally and can receive pointer events.
pointer-events: none only stops interaction. It does not change form validation, focus order, or accessibility semantics. For real form controls, use the disabled attribute when appropriate.
Yes. The element is skipped in hit testing, so the browser can target the element underneath, which is useful for decorative overlays.
pointer-events mainly affects pointer input. Keyboard focus behavior depends on the element type and other properties. Do not rely on pointer-events alone for full accessibility control.