AttachmentPicker
The main attachment picker component that allows users to select and attach files to messages.
This composable displays tabs for different attachment types (gallery, files, camera, polls, commands) and the corresponding content for the selected tab. It is typically wrapped by AttachmentPickerMenu which handles the animated expand/collapse behavior and positioning.
The picker behavior is configured through ChatTheme.config.attachmentPicker:
When
useSystemPickeristrue, shows buttons that launch system pickers (no permissions required)When
useSystemPickerisfalse, shows an in-app grid picker (requires storage permissions)
The picker integrates with AttachmentsPickerViewModel to manage state and with the message composer to add selected attachments to messages.
For customization, override the picker components in ChatTheme.componentFactory:
AttachmentTypePicker- The tab bar for switching between modesAttachmentPickerContent- The content area for each modeAttachmentSystemPicker- The system picker variant
Parameters
The AttachmentsPickerViewModel that manages picker state, including the current mode, available attachments, and selection state.
The modifier to be applied to the picker container.
The current message mode (MessageMode.Normal or MessageMode.MessageThread). Used to determine if poll creation is available (not available in threads).
The AttachmentPickerActions that handle user interactions within the picker. Use AttachmentPickerActions.pickerDefaults for standalone usage or AttachmentPickerActions.defaultActions for full integration with the message composer.