A versatile, multiline text input component for chat interfaces in SwiftUI.
The ChatField
struct provides an enhanced text input experience tailored for chat applications in SwiftUI. It extends beyond the standard SwiftUI text field by offering multiline input capabilities and platform-specific adaptations.
On iOS, ChatField
expands to accommodate multiline input with a customizable line limit, meeting the needs of mobile chat applications.
For macOS, ChatField
is engineered to support desktop chat conventions. It allows users to insert new lines using Shift+Enter
, maintaining a familiar desktop chat interface behavior.
You can find the documentation here: https://kevinhermawan.github.io/ChatField/documentation/chatfield
You can add ChatField
as a dependency to your project using Swift Package Manager by adding it to the dependencies value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/kevinhermawan/ChatField.git", .upToNextMajor(from: "2.0.0"))
]
Alternatively, in Xcode:
- Open your project in Xcode.
- Click on
File
->Swift Packages
->Add Package Dependency...
- Enter the repository URL:
https://github.com/kevinhermawan/ChatField.git
- Choose the version you want to add. You probably want to add the latest version.
- Click
Add Package
.