<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.14.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UserNotifications",
  "identifier" : "/documentation/UserNotifications/UNTextInputNotificationAction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "User Notifications"
    ],
    "preciseIdentifier" : "c:objc(cs)UNTextInputNotificationAction"
  },
  "title" : "UNTextInputNotificationAction"
}
-->

# UNTextInputNotificationAction

An action that accepts user-typed text.

```
class UNTextInputNotificationAction
```

## Overview

Use [`UNTextInputNotificationAction`](/documentation/UserNotifications/UNTextInputNotificationAction) objects to define an action that allows the user to provide a custom text-based response. When the user selects an action of this type, the system displays controls for the user to enter or dictate the text content. That text is then included in the response object that’s delivered to your app.

For information on how to define actions and categories, see [Declaring your actionable notification types](/documentation/UserNotifications/declaring-your-actionable-notification-types).

## Topics

### Essentials

[`init(identifier:title:options:textInputButtonTitle:textInputPlaceholder:)`](/documentation/UserNotifications/UNTextInputNotificationAction/init(identifier:title:options:textInputButtonTitle:textInputPlaceholder:))

Creates an action object that accepts text input from the user.

[`init(identifier:title:options:icon:textInputButtonTitle:textInputPlaceholder:)`](/documentation/UserNotifications/UNTextInputNotificationAction/init(identifier:title:options:icon:textInputButtonTitle:textInputPlaceholder:))

Creates an action object with an icon that accepts text input from the user.

### Getting Information

[`textInputButtonTitle`](/documentation/UserNotifications/UNTextInputNotificationAction/textInputButtonTitle)

The localized title of the text input button that the system displays to the user.

[`textInputPlaceholder`](/documentation/UserNotifications/UNTextInputNotificationAction/textInputPlaceholder)

The placeholder text that the system localizes and displays in the text input field.



---

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)