Interactive previews iPhone

Custom Photo Picker Buttons

Sets the primary and secondary button types of the Photos picker.

Custom Photo Picker Buttons - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 27.3+ iPadOS 27.3+ macOS 27.3+ visionOS 27.3+

Tags

SwiftUI Code

Docs
@State private var selectedPhoto: PhotosPickerItem?

var body: some View {
    PhotosPicker("FooBar", selection: $selectedPhoto)
        .photosPickerButtonType(primary: .choose, secondary: .clear)
}

Found an issue or have a suggestion?

Created: November 17, 2026Updated: November 17, 2026

More PhotosPicker Components

View all
Photos Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Photos Picker

Creates a picker with a title key and selection, and optionally configures the types of items to show and item encoding behavior.

Photos Picker Title - iPadOS - Landscape - Liquid Glass - Light Mode - Preview
modifier

Photos Picker Title

Overrides the title of the Photos picker. The title is not visible on small screens, like the iPhone.

Photos Picker Prompt - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Photos Picker Prompt

Sets the prompt of the Photos picker.

On Secondary Photos Picker Action - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

On Secondary Photos Picker Action

Sets the secondary action handler for the Photos picker.

On Primary Photos Picker Action - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

On Primary Photos Picker Action

Sets the primary action handler for the Photos picker.

Container Photo Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Container Photo Picker

Limits the Photos picker to only show items in the specified container. In this case, to the user-created album "CustomAlbum".

Disable Automatic Photos Picker Dismissal - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Disable Automatic Photos Picker Dismissal

Prevents the Photos picker from dismissing automatically. Without this modifier, the Photos picker would automatically dismiss when an image is tapped.

Range Photo Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Range Photo Picker

Presents a Photos picker that selects a collection of PhotosPickerItem, constrained to a range of selection counts.

Explore Other Components

Browse all
ButtonToggleStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

ButtonToggleStyle

A toggle style that displays as a button with its label as the title.

Tab Bar Section Actions - iPadOS - Landscape - Liquid Glass - Light Mode - Preview
modifier

Tab Bar Section Actions

Adds custom actions to a tab section.

UIKit Separator Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Separator Colors

The UIKit separator colors that are also used in other components, such as the TextField

Tab View Customization - iPadOS - Landscape - Liquid Glass - Light Mode - Preview
modifier

Tab View Customization

Specifies the customizations to apply to the sidebar representation of the tab view.

Materials - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Materials

All materials

Music Picker - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Music Picker

Presents a music picker to select items from the Apple Music catalog and the user’s music library.

VisionOS background materials - visionOS - Liquid Glass - Light Mode - Preview
type

VisionOS background materials

All background materials on visionOS

NavigationControlGroupStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

NavigationControlGroupStyle

The navigation control group style