Skip to content
Theming

Theme the macOS SDK

Match native support and feedback to your Mac app’s appearance.

Apply a messenger theme

Pass BTXTheme through BTXMessengerOptions.theme. Support, feedback, thread history, attachment previews, message bubbles, and composer controls share this theme.

App theme
import BTXClientKit

@MainActor
func configureThemedBTX() {
    let theme = BTXTheme.dark

    BTX.configure(
        BTXConfiguration(
            publishableClientKey: "cfk_...",
            features: [.messenger],
            messengerOptions: BTXMessengerOptions(
                title: "Support",
                appName: "Acme",
                theme: theme
            )
        )
    )
}

Use BTXTheme.light or BTXTheme.dark as a starting palette. colorScheme supports .system, .light, and .dark. Match an explicit palette to its appearance mode.

01

Place and style the panel

SDK 3.6.0 adds optional controls through BTXMessengerOptions.macOS. The standard support panel is bottom trailing, 440 by 584 points with 16-point insets. Use a nil height to fill the space between your top and bottom insets.

Mac presentation
BTXMessengerOptions(
    emptyPromptTitle: "",
    macOS: BTXMacOSMessengerOptions(
        presentation: BTXMacOSPanelPresentation(
            corner: .bottomTrailing,
            width: 440,
            height: nil,
            insets: .init(top: 90, leading: 24, bottom: 60, trailing: 24)
        ),
        panelStyle: BTXMacOSPanelStyle(
            cornerRadius: 0,
            strokeColor: BTXColor(red: 0.5, green: 0.5, blue: 0.5),
            showsShadow: false
        ),
        homeLayout: .compact
    )
)

The same panel styling applies to support and the centered in-window feedback modal. Compact home uses a label-width action. Both layouts keep the action and Threads header fixed, show the loaded thread count, and omit blank or duplicate headings.

In SDK 3.7.0, BTXMacOSPanelStyle also accepts headerDividerColor (nil hides it), primaryButtonLetterSpacing and threadLabelLetterSpacing (points, default 0), timestampFont (optional BTXFont), messageBubbleStrokeColor (optional 1-point stroke), composerCornerRadius (default 16), and composerStrokeColor (defaults to the theme's composer control stroke). These controls style support and feedback where applicable. Invalid numeric values use safe defaults. The thread count appears directly beside Threads. Team photos fall back to customer-visible initials while loading or on failure, including members without photos when returned by the backend. No email address is used for initials.

Pass presentation: to View.btxMessenger(presentation:) or call BTX.messenger.attach(to: window, presentation: layout) to override one window. Update this value when a footer changes. The thread and draft survive the update, and both the panel and reply toasts respect the reserved space. Reattaching an AppKit window without presentation preserves its existing override.

02

Customize supported appearance

Use the shared theme's surface, text, bubble, link, and primary-action colors. Body, title, and hero font overrides are supported. Test text and control contrast in the host app, including image attachments and long messages.

On macOS 26, supported controls use native Liquid Glass. Earlier supported systems use native controls. APNs banners are rendered by macOS; the messenger theme does not style system notifications.