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

# Reorder variants (Beta)

> Reorders the variants of a component

## `component.reorderVariants(variantIds)`

Reorders the variants of a component by specifying the desired order as an array of variant IDs.

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

### Syntax

```typescript
component.reorderVariants(variantIds: string[]): Promise<void>
```

### Parameters

* **`variantIds`**: *string\[]* — An array of variant IDs in the desired order.
  Pass `'base'` to refer to the base variant.
  For a partial reorder, include only the variants to reposition.
  Remaining variants shift to follow the last repositioned variant.

### Returns

**Promise\<void>**

A Promise that resolves when the reorder is complete.

### Examples

Fully reorder all variants:

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

if (component) {
  await component.reorderVariants(['base', 'variant-2', 'variant-1', 'variant-3'])
}
```

Partially reorder variants:

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

if (component) {
  // Before: base, variant-1, variant-2, variant-3
  await component.reorderVariants(['variant-1', 'variant-3'])
  // After: base, variant-1, variant-3, variant-2
}
```

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