---
title: "Customize AI Assistant appearance"
canonical_url: "https://www.nutrient.io/guides/ios/ai-assistant/appearance-customization-swiftui/"
md_url: "https://www.nutrient.io/guides/ios/ai-assistant/appearance-customization-swiftui.md"
last_updated: "2026-05-14T16:53:43.860Z"
description: "Learn how to customize the appearance of AI Assistant using AIAssistantView in your SwiftUI iOS app."
---

# Customize AI Assistant appearance

### SwiftUI

[SwiftUI](https://www.nutrient.io/guides/ios/ai-assistant/appearance-customization-swiftui.md)

### UIKit

[UIKit](https://www.nutrient.io/guides/ios/ai-assistant/appearance-customization-uikit.md)

> Note: When using [on-device AI Assistant](https://www.nutrient.io/guides/ios/ai-assistant/on-device.md), showing the chat UI programmatically isn’t supported. However, you can still customize the appearance by using the [`pdfViewController(_:shouldShow:options:animated:)`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/pdfviewcontrollerdelegate/pdfviewcontroller(_:shouldshow:options:animated:)) delegate method and checking for the `AIAssistantViewController` class.

The AI Assistant chat UI can be presented independently using [`AIAssistantView`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/aiassistantview). You can also customize its appearance to match your application.

The chat UI provides color customization options for its appearance. You can customize background colors, text colors, and accent colors for messages, input fields, and the overall container.

## Appearance customization

To customize the appearance of [`AIAssistantView`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/aiassistantview), use the [`aiAssistantStyle(_:)`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/swiftuicore/view/aiassistantstyle(_:)) modifier with these three main style types:

- **[`AIAssistantStyle`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/aiassistantstyle)** — Main style that controls how the entire chat interface looks. Set the background color and customize the message bubble and input field styling all in one place.

- **[`AIAssistantMessageStyle`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/aiassistantmessagestyle)** — Controls the background colors, text colors, and colors for interactive elements like links for message bubbles from AI and users.

- **[`AIAssistantInputStyle`](https://www.nutrient.io/api/ios/documentation/pspdfkitui/aiassistantinputstyle)** — Controls the input area’s text field background and send button color.

### Example implementation

```swift

AIAssistantView(session: aiSession).aiAssistantStyle(
        AIAssistantStyle(
            backgroundColor: UIColor(red: 0.98, green: 0.98, blue: 0.98, alpha: 1),
            messageStyle: AIAssistantMessageStyle(
                userMessageBackgroundColor: UIColor(red: 0.85, green: 0.93, blue: 0.87, alpha: 1.0),
                aiMessageBackgroundColor: UIColor(red: 0.92, green: 0.89, blue: 0.98, alpha: 1.0),
                userMessageTextColor: UIColor(red: 0.18, green: 0.24, blue: 0.21, alpha: 1.0),
                aiMessageTextColor: UIColor(red: 0.16, green: 0.13, blue: 0.32, alpha: 1.0),
                interactiveAccentColor: UIColor(red: 0.38, green: 0.53, blue: 0.96, alpha: 1.0)
            ),
            inputStyle: AIAssistantInputStyle(
                inputBackgroundColor: UIColor(red: 0.98, green: 0.98, blue: 0.98, alpha: 1),
                sendButtonColor: UIColor(red: 0.435, green: 0.710, blue: 0.475, alpha: 1)
            )
        )
    )

```
---

## Related pages

- [Add AI capabilities to Nutrient document viewer](/guides/ios/ai-assistant.md)
- [Introduction to AI Assistant](/guides/ios/ai-assistant/introduction.md)
- [Work with multiple documents in AI Assistant](/guides/ios/ai-assistant/multiple-documents-uikit.md)
- [Work with multiple documents in AI Assistant](/guides/ios/ai-assistant/multiple-documents-swiftui.md)
- [Customize AI Assistant appearance](/guides/ios/ai-assistant/appearance-customization-uikit.md)
- [On-device AI Assistant with Apple Intelligence](/guides/ios/ai-assistant/on-device.md)

