---
title: "add(_:)"
framework: usdkit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: "usdkit/usdprim/variantset/add(_:)"
---

# add(_:)

Adds a new variant to this variant set.

## Declaration

```swift
func add(_ variantName: String) throws
```

## Parameters

- `variantName`: The name of the variant to add.

## Discussion

Discussion note: An error if the variant cannot be added.
