> ## 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.

# Excluding Dynamic Class Names, IDs and Attributes

> Dynamically generated class names, IDs, and attributes in JavaScript frameworks like React.js and Ember.js can hinder Userpilot's ability to target elements.

## 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 under Settings. You can access it by navigating to the [Exclude Lists](https://run.userpilot.io/settings/exclude-lists) under your Settings.

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

**Material-UI**

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

```
jss(.+?)$
```

```
css(.+?)$
```

**Styled-components**

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

```
sc-(.+?)-(.+?)buffer_3lt;
	
```

```
^[a-zA-Z]{6}buffer_4lt;
	
```

**Ember**

Example: Excluding the number in the Id #ember45

```
ember(.+?)$
```

<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" />
