<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 7.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeveloperToolsSupport",
  "identifier" : "/documentation/DeveloperToolsSupport/LibraryItem",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "DeveloperToolsSupport"
    ],
    "preciseIdentifier" : "s:21DeveloperToolsSupport11LibraryItemV"
  },
  "title" : "LibraryItem"
}
-->

# LibraryItem

A single item to add to the Xcode library.

```
struct LibraryItem
```

## Overview

Declare a library item to describe an entry in the Xcode library.
Xcode discovers and validates library items that you place in the context of
a [`LibraryContentProvider`](/documentation/DeveloperToolsSupport/LibraryContentProvider) instance.

At a minimum, you provide an expression that Xcode uses when the user
chooses the library item. You can provide any expression that compiles in
the context of the library item instantiation. However, Xcode only honors
items that adhere to certain restrictions, as described in
[`views`](/documentation/DeveloperToolsSupport/LibraryContentProvider/views) and
[`modifiers(base:)`](/documentation/DeveloperToolsSupport/LibraryContentProvider/modifiers(base:)).

You can also provide additional characteristics, like a title
and a category, to help you find the item when searching the library.

## Topics

### Creating a Library Item

[`init(_:visible:title:category:matchingSignature:)`](/documentation/DeveloperToolsSupport/LibraryItem/init(_:visible:title:category:matchingSignature:))

Creates a new library item.

[`Category`](/documentation/DeveloperToolsSupport/LibraryItem/Category)

The kinds of library items that you can create.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)