<!--
{
  "availability" : [
    "iOS: 26.4.0 -",
    "iPadOS: 26.4.0 -",
    "macCatalyst: 26.4.0 -",
    "macOS: 26.4.0 -",
    "visionOS: 26.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ClassKitUI",
  "identifier" : "/documentation/ClassKitUI/AssignedDocumentLabel",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "ClassKit UI"
    ],
    "preciseIdentifier" : "s:10ClassKitUI21AssignedDocumentLabelV"
  },
  "title" : "AssignedDocumentLabel"
}
-->

# AssignedDocumentLabel

A view that displays the status or date information of the assigned document.

```
@MainActor @preconcurrency struct AssignedDocumentLabel
```

## Overview

`AssignedDocumentLabel` displays information about an assigned document for students,
including submission status and relevant dates like due dates. The view automatically updates its
appearance based on assigned document state, showing past-due items in red.

```swift
VStack(alignment: .leading) {
    Text("My Document")
        .font(.headline)

    HStack {
        AssignedDocumentLabel(role: .status, documentURL: documentURL)
        AssignedDocumentLabel(role: .date, documentURL: documentURL)
    }
    .font(.caption)
}
```

## Topics

### Structures

[`struct Role`](/documentation/ClassKitUI/AssignedDocumentLabel/Role)

The type of assignment information to display.

### Initializers

[`init(role: AssignedDocumentLabel.Role, documentURL: URL)`](/documentation/ClassKitUI/AssignedDocumentLabel/init(role:documentURL:))

Creates a label that displays information about the assigned document.

## Relationships

### Conforms To

[`View`](/documentation/SwiftUI/View)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)