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

# Delete a variant (Beta)

> Deletes a variant from a component

## `component.deleteVariant(options)`

Deletes a variant from a component by ID.

You cannot delete the base variant.

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

### Syntax

```typescript
component.deleteVariant(options: DeleteVariantOptions): Promise<void>
```

Related interfaces:

```typescript
interface DeleteVariantById {
  id: string;
}

type DeleteVariantOptions = DeleteVariantById;
```

### Parameters

* **`options`**: *DeleteVariantOptions* — An object specifying the variant to delete:

  * **`id`**: *string* — The ID of the variant to delete.

### Returns

**Promise\<void>**

A Promise that resolves when the variant is deleted.

### Example

```typescript
const component = await webflow.getCurrentComponent()

if (component) {
  await component.deleteVariant({ id: 'variant-456' })
}
```

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

### Designer Ability

| Designer Ability        | Permission | Locale | Branch | Workflow | Sitemode |
| :---------------------- | :--------- | :----- | :----- | :------- | :------- |
| **canModifyComponents** | any        | any    | any    | Canvas   | Design   |