Favorites

CSS interactivity Property

interactivity
CSS PropertyThis property is supported in some modern browsers, but not all.
Updated 22nd November 2026

The interactivity property can make an element and its contents inert, like the HTML inert attribute, with the value inert.

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.

Description

The interactivity property makes an element and its descendants inert from CSS. With interactivity: inert the content cannot be focused, clicked, selected or found with find-in-page, and it is hidden from assistive technology, exactly like the HTML inert attribute.

Because it is a CSS property, inertness can now depend on styles, for example making the slides of a carousel that are scrolled out of view inert, or disabling the rest of a page while a custom drawer is open. The property is inherited, but a descendant can set interactivity: auto only if it is not inert for another reason, such as the inert attribute or a modal dialog.

Inert content is still visible, so it is good practice to also change its appearance, for example with reduced opacity, to make the state clear to sighted users.

Definition

Initial value
auto
Applies to
all elements
Inherited
yes
Computed value
as specified
Animatable
discrete
JavaScript syntax
object.style.interactivity

Interactive Demo

Try to click the button, select this text or type in the field.
Demo Code
HTML Code
<div class="demo-element">
	Try to click the button, select this text or type in the field.
	<button type="button" onclick="this.textContent = 'Clicked!'">Click me</button>
	<input type="text" value="Type here" aria-label="Type here">
</div>
CSS Code
.demo-element {
	width: 260px;
	padding: 14px;
	background: #e7ecff;
	border: 2px solid #4361ee;
	font-size: 15px;
	display: grid;
	gap: 8px;
	interactivity: auto;
}

Syntax

interactivity: auto | inert;

Values

  • autoThe default. The element is interactive unless it is inert for another reason.
  • inertThe element and its descendants become inert: they cannot receive focus or pointer events and are hidden from assistive technology.
  • initialSets the property to its initial value.
  • inheritTakes the computed value of the parent element.

Example

<div class="form">
<p>Active form</p>
<input placeholder="You can type here"> <button>Send</button>
</div>
<br>
<div class="form locked">
<p>Inert form</p>
<input placeholder="Cannot be focused"> <button>Send</button>
</div>
.form {
  font-family: system-ui, sans-serif;
  padding: 16px;
  border: 2px solid #4361ee;
  border-radius: 8px;
  width: 280px;
}

.form.locked {
  interactivity: inert;   /* cannot be focused or clicked */
  opacity: 0.5;
}

input, button {
  font: inherit;
  padding: 6px 10px;
  margin: 4px 0;
}
Open in editor

Browser Support

The following information will show you the current browser support for the CSS interactivity property. Hover over a browser icon to see the version that first introduced support for this CSS property.

This property is supported in some modern browsers, but not all.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported

Looks like you're using an ad blocker, and that's fine! Ads help keep CSS Portal's generators and references free, so if the site's useful to you, visit our Support page to see other ways to help.