Interactive previews iPhone
PasteButton
A system button that reads items from the pasteboard and delivers it to a closure.
Platform Compatibility
iOS 16.0+ iPadOS 16.0+ macOS 10.15+ visionOS 1.0+
Tags
SwiftUI Code
@State private var pastedText: String = ""
var body: some View {
PasteButton(payloadType: String.self) { strings in
pastedText = strings[0]
}
}Found an issue or have a suggestion?
Created: May 30, 2025Updated: December 27, 2025
More Button Components
View allGlass Button Styles
A button style that applies glass border artwork based on the button’s context
Explore Other Components
Browse allLinearProgressViewStyle
A progress view that visually indicates its progress using a horizontal bar
Message Item Alert
Presents an alert with a message using the given data to produce the alert’s content and a localized string key for a title.
Navigation Container Background
Sets the container background of the enclosing container using a view.
MenuPickerStyle
A picker style that presents the options as a menu when the user presses a button, or as a submenu when nested within a larger menu.