> ## Documentation Index
> Fetch the complete documentation index at: https://docs.userpilot.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exclude CSS Selectors

> Easily excluding dynamically generated class names, IDs, and attributes in JavaScript frameworks like React.js and Ember.js that could affect Userpilot's ability to target elements properly.

## Overview

Dynamically generated class names, IDs, and attributes in JavaScript frameworks like React.js and Ember.js can hinder Userpilot's ability to target elements accurately. This article guides users on configuring Userpilot to exclude such dynamic attributes using regular expressions, ensuring more reliable element targeting. These patterns are variable and might change on every page load or deployment.

Some examples of such patterns:

```css theme={null}
.sc-1fzu5ml-0 // styled-component
.jss514 // React.js
#ember45 // ember.js
```

To improve targeting, Userpilot lets you exclude attributes using Regex in the [Exclude Lists](https://run.userpilot.io/settings/exclude-lists) under Settings.

## **Example frameworks and how to exclude them**

**Material-UI**

Example: Excluding the auto-generated portion in the class with the format .jss514

```text theme={null}
jss(.+?)$
```

```text theme={null}
css(.+?)$
```

**Styled-components**

Example: Using a regular expression to only match the stable portion of the class .sc-1fzu5ml-0

```text theme={null}
sc-(.+?)-(.+?)$
```

**Ember**

Example: Excluding the number in the ID #ember45

```text theme={null}
ember(.+?)$
```

<Frame>
  <img src="https://mintcdn.com/userpilot/0XEiWZ1rhiOKgu7L/images/screencapture-run-userpilot-io-settings-exclude-lists-2025-12-15-21_42_56.png?fit=max&auto=format&n=0XEiWZ1rhiOKgu7L&q=85&s=eb04d14e42bb3bbbafee3557323bb5bf" alt="Screencapture Run Userpilot Io Settings Exclude Lists 2025 12 15 21 42 56 Pn" width="2880" height="1922" data-path="images/screencapture-run-userpilot-io-settings-exclude-lists-2025-12-15-21_42_56.png" />
</Frame>

<Frame>
  [For any questions or concerns please reach out to **support@userpilot.com**](mailto:support@userpilot.com)
</Frame>
