> This page is for Designer API.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Remove attribute (Beta)

> Remove a single attribute from an element by name or index.

## `element.removeAttribute(name)` / `element.removeAttribute(index)`

Remove a single attribute from an element.

You can identify the attribute to remove by its name string or by its zero-based index in the attributes array.

This method is equivalent to the [`element.removeCustomAttribute(name)`](/designer/reference/custom-attributes/removeCustomAttribute) method.

> **Beta**
>
> These methods are in public beta and may change with future releases.

### Syntax

```typescript
element.removeAttribute(name: string): Promise<null>
element.removeAttribute(index: number): Promise<null>
```

### Parameters

* **`name`** : *string* — The name of the attribute to remove.
* **`index`** : *number* — The zero-based position of the attribute in the element's attributes array.

### Returns

**Promise\<null>**

A Promise that resolves to `null`.

### Example

```typescript
const element = await webflow.getSelectedElement()

if (element && element.attributes) {
  // Remove by name
  await element.removeAttribute('data-label')

  // Remove by index
  await element.removeAttribute(0)
}
```

[Try this example](https://webflow.com/oauth/authorize?response_type=code\&client_id=19511de1ec410f9228d8dcbc9420e67916dea80d86d18f0c9a533eb475ea0f62)

### Designer Ability

| Designer Ability | Locale  | Branch | Workflow | Sitemode |
| :--------------- | :------ | :----- | :------- | :------- |
| **canDesign**    | Primary | Main   | Canvas   | Design   |