Explore SwiftUI
Visually
Discover SwiftUI APIs, components, and modifiers through visual examples with ready-to-use code samples. Copy, paste, and ship.
Explore SwiftUI for iPhone Duo
Explore SwiftUI APIs, components, and modifiers for iPhone Duo. Compare layouts across orientations and hinge states with visual previews and Swift code.
Inline Photos Picker Style
A photos picker style that displays the picker inline without presenting a sheet.
Compact Photos Picker Style
A photos picker style that displays the picker without presenting a sheet.
Photos Picker
Creates a picker with a title key and selection, and optionally configures the types of items to show and item encoding behavior.
Preferred Top Column
Controls which column appears on top of the stack when NavigationSplitView collapses into a single stack in certain contexts, such as on iPhone, when iPhone Duo is closed, or on Apple Watch. By default, the sidebar appears on top. In this case, the detail column does instead.
Hide Sidebar Toggle
Removes the sidebar toggle toolbar item a NavigationSplitView adds by default.
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.
Glass Button Styles
A button style that applies glass border artwork based on the button’s context
Button Styles
A type that applies standard interaction behavior and a custom appearance to all buttons within a view hierarchy
Toolbar Overflow Menu
The overflow menu of a toolbar. An overflow menu represents actions that are always placed in the toolbar’s overflow menu, regardless of the toolbar mode, platform, or customizability.
Prefer Vertical Toolbar Items
A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.
ToolbarItem Shared Background Visibility
Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping
Pinned Toolbar Item Placement
A placement that pins the item to the trailing edge of the toolbar.
SliderTickContentForEach
A type of slider content that creates content by iterating over a collection.
Custom Slider Ticks
Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels and customizable ticks.
Stepped Min Max Label Slider
Creates a slider to select a value from a given range, subject to a step increment, which displays the provided labels
Stepped Slider
Creates a slider to select a value from a given range, subject to a step increment
Multiple Sources Toggle
Creates a toggle that updates the selected property for all sources. Once toggled, all sources will have the same value.
Custom Value Label Picker
Creates a picker that generates its label from a localized string key and accepts a custom current value label.
Multiple Sources Picker
Creates a picker that updates the selected property for all sources.
TabsPickerStyle
A picker style that presents options as segmented tabs. On macOS, this style produces a segmented picker with a visual treatment that distinguishes tab navigation from value selection. On iOS, tvOS, and visionOS, the visual appearance matches that of the standard standard .segmented style. On all supported platforms, VoiceOver announces options as tabs.
WheelPickerStyle
A picker style that presents the options in a scrollable wheel that shows the selected option and a few neighboring options.
SegmentedPickerStyle
A picker style that presents the options in a segmented control. Use this style when there are two to five options. Consider using menu when there are more than five options.
PalettePickerStyle
A picker style that presents the options as a row of compact elements. When used outside of menus, this style is rendered as a segmented picker. If that is the intended usage, consider segmented instead.
NavigationLinkPickerStyle
A picker style represented by a navigation link that presents the options by pushing a List-style picker 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.
InlinePickerStyle
A PickerStyle where each option is displayed inline with other views in the current container.
Horizontal Radio Group Layout
Sets the style for radio group style pickers within this view to be horizontally positioned with the radio buttons inside the layout.