Interactive previews iPhone

Music Picker

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

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

Platform Compatibility

iOS 27.0+ iPadOS 27.0+ visionOS 27.0+

Tags

SwiftUI Code

Docs
import MusicKit

@State var showMusicPicker = true
@State var selectedSongs: MusicItemCollection<Song> = []

var body: some View {
    Text("Foo")
        .musicPicker(
            isPresented: $showMusicPicker,
            title: Text("Bar"),
            selection: $selectedSongs
        )
    }

Found an issue or have a suggestion?

Created: August 23, 2026Updated: August 23, 2026

More View Components

View all
Scroll Gesture Axis Lock - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Scroll Gesture Axis Lock

Sets whether scrollable views within this view lock each scroll gesture to its predominant axis. On macOS, scroll gestures lock to their predominant axis by default. On iOS, iPadOS, Mac Catalyst, visionOS, and watchOS, scroll gestures move along both axes at once.

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

VisionOS background materials

All background materials on visionOS

Container Content Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Container Content Margins

Adds the margins of the container the view is in.

Toolbar Vertical Edge - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
environment

Toolbar Vertical Edge

This value reflects the system’s preferred edge for the vertical bar in the current context, regardless of whether a vertical bar is currently visible. Use it to position custom bars or other UI relative to the system’s bar placement.

Hinge State - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
structure

Hinge State

A type encapsulating the state of a single hinge.

Disabled Toolbar Vertical Behavior - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
modifier

Disabled Toolbar Vertical Behavior

Disables the vertical bar.

App Store Overlay - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

App Store Overlay

Presents a StoreKit overlay when a given condition is true.

Manage Subscriptions Sheet - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Manage Subscriptions Sheet

Opens the manage subscriptions sheet.

Explore Other Components

Browse all
RadioGroupPickerStyle - macOS - Liquid Glass - Light Mode - Preview
style

RadioGroupPickerStyle

A picker style that presents the options as a group of radio buttons.

Section Index Label and Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Section Index Label and Visibility

Sets the label that is used in a section index to point to this section, typically only a single character long. Changes the visibility of the list section index.

Store Cancellation Button - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Store Cancellation Button

A type of button that people use to dismiss the current store presentation. It is displayed by default and only works in a sheet.

Axis Behavior - iOS on iPhone Duo - Landscape - Closed - Liquid Glass - Light Mode - Preview
modifier

Axis Behavior

The bar axis behavior of the toolbar item.

Prefer Vertical Toolbar Items - iOS on iPhone Duo - Landscape - Closed - Liquid Glass - Light Mode - Preview
modifier

Prefer Vertical Toolbar Items

A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.

DatePicker Components  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

DatePicker Components

A date picker with only one displayed component

Current Value Gauge  - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Current Value Gauge

Creates a gauge showing a value within a range and that describes the gauge’s purpose and current value

Overlay Arrangement ZIndex - iOS on iPhone Duo - Landscape - Fully Open - Liquid Glass - Light Mode - Preview
environment

Overlay Arrangement ZIndex

The z-index for a view within an overlay arrangement view.