{"id":15055412,"url":"https://github.com/eneskaraosman/swiftychat","last_synced_at":"2026-04-05T23:05:37.789Z","repository":{"id":38740481,"uuid":"266545880","full_name":"EnesKaraosman/SwiftyChat","owner":"EnesKaraosman","description":"SwiftUI Chat UI (Client) Framework \u0026 Documentation to get started!","archived":false,"fork":false,"pushed_at":"2024-04-13T12:39:59.000Z","size":19331,"stargazers_count":250,"open_issues_count":1,"forks_count":46,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-05-01T17:54:02.278Z","etag":null,"topics":["chat","chat-application","chat-bot","chatbot","chatbot-framework","chatroom","inputview","ios","message","messaging","swiftui"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EnesKaraosman.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"enesKaraosman","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2020-05-24T13:24:29.000Z","updated_at":"2024-06-10T17:30:20.944Z","dependencies_parsed_at":"2023-11-18T09:27:56.957Z","dependency_job_id":"4defec40-03e7-4cf2-847f-c1b757ae40fc","html_url":"https://github.com/EnesKaraosman/SwiftyChat","commit_stats":null,"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwiftyChat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwiftyChat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwiftyChat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EnesKaraosman%2FSwiftyChat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EnesKaraosman","download_url":"https://codeload.github.com/EnesKaraosman/SwiftyChat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485287,"owners_count":20946398,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chat","chat-application","chat-bot","chatbot","chatbot-framework","chatroom","inputview","ios","message","messaging","swiftui"],"created_at":"2024-09-24T21:41:52.985Z","updated_at":"2026-04-05T23:05:37.783Z","avatar_url":"https://github.com/EnesKaraosman.png","language":"Swift","funding_links":["https://github.com/sponsors/enesKaraosman"],"categories":[],"sub_categories":[],"readme":"![Swift 6.0](https://img.shields.io/badge/Swift-6.0-orange.svg)\n![iOS 17+](https://img.shields.io/badge/iOS-17%2B-blue.svg)\n![macOS 14+](https://img.shields.io/badge/macOS-14%2B-blue.svg)\n\n# SwiftyChat\n\nA lightweight SwiftUI chat UI with [built-in message types](#message-kinds), theming, and cross-platform support.\n\nAlso available for [Flutter](https://github.com/EnesKaraosman/swifty_chat).\n\n## Features\n\n- High-performance rendering (O(n) complexity, cached formatters, async image loading)\n- 10 built-in message types including text, image, video, location, carousel, and quick replies\n- 8 pre-built [themes](#pre-built-themes) with full style customization via environment\n- [Custom message cells](CustomMessage.md) for any message type you need\n- Cross-platform: iOS 17+ and macOS 14+\n- Landscape orientation support with auto-scaling cells\n- User avatars with configurable positioning\n- Keyboard dismiss on tap and scroll\n- Scroll to bottom or to a specific message\n- Picture-in-Picture video playback\n- Per-corner rounding on text bubbles\n- Multiline input bar ([BasicInputView](../master/Sources/SwiftyChat/InputView/BasicInputView.swift))\n- Attributed string / markdown support\n\n## Preview\n\n\u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/swiftyChatGIF.gif\" height=\"240\"/\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eBasic Example\u003c/summary\u003e\n\n  | Light | Dark |\n:---:|:---:|\n\u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/basic-1.png\" width=\"240\"/\u003e | \u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/basic-2.png\" width=\"240\"/\u003e\n\n\u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/basic-3.png\" height=\"240\"/\u003e\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eAdvanced Example\u003c/summary\u003e\n\n  | Contact, QuickReply, Text, Carousel | Map, Image | ContextMenu |\n:---:|:---:|:---:\n\u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/avatar_contact_qr_carousel_text.png\" width=\"240\"/\u003e | \u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/map_image.png\" width=\"240\"/\u003e | \u003cimg src=\"../master/Sources/SwiftyChat/Demo/Preview/contextMenu.png\" width=\"240\"/\u003e\n\n\u003c/details\u003e\n\n## Installation\n\n```\nhttps://github.com/EnesKaraosman/SwiftyChat.git\n```\n\nAdd via Swift Package Manager in Xcode.\n\n## Message Kinds\n\n```swift\npublic enum ChatMessageKind: CustomStringConvertible {\n    case text(String)              // Auto-scales for emoji-only messages\n    case image(ImageLoadingKind)   // Local (UIImage/NSImage) or remote (URL)\n    case imageText(ImageLoadingKind, String) // Image with caption\n    case location(LocationItem)    // MapKit pin\n    case contact(ContactItem)      // Shareable contact card\n    case quickReply([QuickReplyItem]) // Tappable options, auto-disables after selection\n    case carousel([CarouselItem])  // Scrollable cards with buttons\n    case video(VideoItem)          // Video with PiP support\n    case loading                   // Animated loading indicator\n    case custom(Any)               // Your own message type\n}\n```\n\n## Usage\n\n### Minimal setup\n\n```swift\nimport SwiftyChat\n\n@State private var messages: [YourMessage] = []\n@State private var scrollToBottom = false\n\nChatView(\n    messages: $messages,\n    scrollToBottom: $scrollToBottom\n) {\n    BasicInputView(\n        message: $message,\n        placeholder: \"Type something\",\n        onCommit: { messageKind in\n            messages.append(/* your message */)\n        }\n    )\n}\n.environment(\\.chatStyle, ChatMessageCellStyle())\n```\n\n`YourMessage` must conform to the `ChatMessage` protocol (which has an associated `ChatUser` type). See the [Example app](../master/Example) for a complete implementation.\n\n### Input view\n\nA built-in `BasicInputView` is included. Use it as-is, or build your own — `ChatView` accepts any view via its `inputView` closure.\n\n### Styling\n\nEvery visual aspect is customizable through `ChatMessageCellStyle`:\n\n```swift\npublic struct ChatMessageCellStyle {\n    let incomingTextStyle: TextCellStyle\n    let outgoingTextStyle: TextCellStyle\n    let incomingCellEdgeInsets: EdgeInsets\n    let outgoingCellEdgeInsets: EdgeInsets\n    let contactCellStyle: ContactCellStyle\n    let imageCellStyle: ImageCellStyle\n    let imageTextCellStyle: ImageTextCellStyle\n    let quickReplyCellStyle: QuickReplyCellStyle\n    let carouselCellStyle: CarouselCellStyle\n    let locationCellStyle: LocationCellStyle\n    let videoPlaceholderCellStyle: VideoPlaceholderCellStyle\n    let incomingAvatarStyle: AvatarStyle\n    let outgoingAvatarStyle: AvatarStyle\n}\n```\n\nInject via `.environment(\\.chatStyle, yourStyle)`. All properties have sensible defaults.\n\nSee [Styles.md](../master/Styles.md) for the full style reference and [CustomMessage.md](CustomMessage.md) for custom cell types.\n\n## Pre-built Themes\n\n| Theme | Description |\n|-------|-------------|\n| **Modern** | Clean blue, minimal design |\n| **Classic** | Traditional green messaging |\n| **Dark Neon** | Cyberpunk with neon pink accents |\n| **Minimal** | Subtle gray tones |\n| **Ocean** | Calming teal, sea-inspired |\n| **Sunset** | Warm orange gradients |\n| **Nature** | Fresh green, eco-friendly |\n| **Lavender** | Soft purple, relaxing |\n\nSee `ThemeShowcaseView` in the Example app for live demos.\n\n## Contributing\n\nPRs are welcome for features, bug fixes, or documentation improvements.\n\n## Inspiration\n\n- [MessageKit](https://github.com/MessageKit/MessageKit) (UIKit)\n- [Nio](https://github.com/niochat/nio) (SwiftUI)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskaraosman%2Fswiftychat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feneskaraosman%2Fswiftychat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feneskaraosman%2Fswiftychat/lists"}