Skip to main content
Components show a state view while data loads, when there is nothing to show, and when a fetch fails. Replace any of them with your own view, or hide them.

State Types


Replacing State Views

Each component takes loadingView, emptyView and errorView closures returning AnyView. errorView receives a retry closure — call it to fetch again:
The same three are modifiers that reach every instance below them, for example .cometChatConversationEmptyView { … }. The argument wins over the modifier.
Conversations list showing a custom loading view

loadingView

Conversations list showing a custom empty state

emptyView

Conversations list showing a custom error state with a retry button

errorView

UIKit Conversations showing a custom loading view

UIKit loadingView

UIKit Conversations showing a custom empty state

UIKit emptyView

UIKit Conversations showing a custom error state

UIKit errorView


Restyle Instead of Replacing

To keep the built-in views and change only their colours and fonts, use the component’s style.

Hiding State Views


Components with State Views