---
title: "modifiers(base:)"
framework: developertoolssupport
role: symbol
role_heading: Instance Method
path: "developertoolssupport/librarycontentprovider/modifiers(base:)"
---

# modifiers(base:)

Indicates a collection of SwiftUI view modifiers to add to the Xcode library.

## Declaration

```swift
@LibraryContentBuilder func modifiers(base: Self.ModifierBase) -> [LibraryItem]
```

## Parameters

- `base`: An instance to apply modifiers to when declaring a library item.

## Discussion

Discussion Xcode adds the LibraryItem instances returned by your implementation of this method to its Modifiers library. The following restrictions apply: You must instantiate the library items inline. If specified, the item’s title, category, and matchingSignature must be static strings and not nil. The item’s visible value, if specified, must be a literal Boolean value. The item’s expression must be a reference expression where the root reference is base and the expression contains at least one modifier, like base.opacity(0.5).

## See Also

### Adding Modifiers

- [ModifierBase](developertoolssupport/librarycontentprovider/modifierbase.md)
