AttachmentUploadProgressIndicator

AttachmentUploadProgressIndicator documents the indicator components used by upload previews and pending message attachments.

These are the default inline indicators shown for in-progress, retryable, and not-supported attachment upload states. The in-progress indicators read upload state from client.uploadManager when they receive a pending attachment localId.

Components

FileUploadInProgressIndicator

Shown while a file or audio upload is actively in progress. It renders AttachmentUploadIndicator plus a uploaded / total file-size label when totalBytes is available.

ImageUploadInProgressIndicator

Shown while an image or video upload is actively in progress. It renders AttachmentUploadIndicator in overlay mode.

AttachmentUploadIndicator

Shared upload indicator used by composer previews and message-list attachments. It subscribes to client.uploadManager with usePendingAttachmentUpload(localId) and renders either a determinate circular progress ring or an ActivityIndicator.

CircularProgressIndicator

Circular progress ring used by AttachmentUploadIndicator. Override this when you want to keep the SDK upload-state wiring but replace the ring UI.

MediaUploadProgressOverlay

Full-cover overlay used for image and video thumbnails while pending uploads are active.

Props

FileUploadInProgressIndicator

PropDescriptionType
localIdLocal attachment id used to read client.uploadManager.string
sourceUrlLocal source URL for the pending attachment.string
totalBytesTotal file size used to render the uploaded-size label.number | string | null

ImageUploadInProgressIndicator

PropDescriptionType
localIdLocal attachment id used to read client.uploadManager.string
sourceUrlLocal source URL for the pending attachment.string

AttachmentUploadIndicator

PropDescriptionType
containerStyleStyle applied to the compact indicator container.StyleProp<ViewStyle>
localIdLocal attachment id used to read client.uploadManager.string
sizeIndicator diameter. Defaults to 16, or 28 for overlay mode.number
sourceUrlLocal source URL for the pending attachment.string
strokeWidthCircular progress stroke width. Defaults to 2, or 3 for overlay mode.number
styleStyle applied to the rendered indicator.StyleProp<ViewStyle>
testIDTest id for the indicator.string
variantVisual variant. Defaults to 'compact'.'compact' | 'overlay'

CircularProgressIndicator

PropDescriptionType
backgroundColorFill color behind the progress ring.ColorValue
filledColorFilled progress stroke color.ColorValue
progressUpload progress from 0 to 100.number
unfilledColorUnfilled progress stroke color.ColorValue
sizeIndicator diameter. Defaults to 16.number
strokeWidthProgress stroke width. Defaults to 2.number
styleStyle applied to the rendered indicator.StyleProp<ViewStyle>
testIDTest id for the indicator.string

MediaUploadProgressOverlay

PropDescriptionType
progressUpload progress from 0 to 100.number
sizeIndicator diameter. Defaults to 18.number
strokeWidthProgress stroke width. Defaults to 3.number
testIDTest id for the overlay content.string

FileUploadRetryIndicator

PropDescriptionType
onPressCallback fired when the retry indicator is pressed.() => void

FileUploadNotSupportedIndicator

PropDescriptionType
localMetadataUpload metadata for the unsupported file attachment.LocalAttachmentUploadMetadata

ImageUploadRetryIndicator

PropDescriptionType
onRetryHandlerCallback fired when the retry indicator is pressed.() => void

ImageUploadNotSupportedIndicator

ImageUploadNotSupportedIndicator has no props.

Custom upload progress UI

For custom indicators, use the usePendingAttachmentUpload hook instead of subscribing to client.uploadManager manually.

import { Text, View } from "react-native";
import {
  Channel,
  MessageComposer,
  MessageList,
  WithComponents,
  usePendingAttachmentUpload,
} from "stream-chat-react-native";

const CustomAttachmentUploadIndicator = ({ localId }) => {
  const { isUploading, uploadProgress } = usePendingAttachmentUpload(localId);

  if (!isUploading) {
    return null;
  }

  return (
    <View>
      <Text>{Math.round(uploadProgress ?? 0)}%</Text>
    </View>
  );
};

<WithComponents
  overrides={{ AttachmentUploadIndicator: CustomAttachmentUploadIndicator }}
>
  <Channel channel={channel}>
    <MessageList />
    <MessageComposer />
  </Channel>
</WithComponents>;