Layout
- AnyLayoutA type-erased instance of the layout protocol.
- GeometryReaderA container view that defines its content as a function of its own size and coordinate space.
- GlassEffectContainerA view that combines multiple glass shapes into a single shape that can morph individual shapes into one another.
- GridA container view that arranges other views in a two dimensional layout.
- GridLayoutA grid that you can use in conditional layouts.
- GridRowA horizontal row in a two dimensional grid container.
- HStackA view that arranges its subviews in a horizontal line.
- HStackLayoutA horizontal container that you can use in conditional layouts.
- LazyHGridA container view that arranges its child views in a grid that grows horizontally, creating items only as needed.
- LazyHStackA view that arranges its children in a line that grows horizontally, creating items only as needed.
- LazyVGridA container view that arranges its child views in a grid that grows vertically, creating items only as needed.
- LazyVStackA view that arranges its children in a line that grows vertically, creating items only as needed.
- ScrollViewA scrollable view.
- ScrollViewReaderA view that provides programmatic scrolling, by working with a proxy to scroll to known child views.
- SpacerA flexible space that expands along the major axis of its containing stack layout, or on both axes if not contained in a stack.
- VStackA view that arranges its subviews in a vertical line.
- VStackLayoutA vertical container that you can use in conditional layouts.
- ZStackA view that overlays its subviews, aligning them in both axes.
- ZStackLayoutAn overlaying container that you can use in conditional layouts.
Text and images
- AsyncImageA view that asynchronously loads and displays an image.
- ContentUnavailableViewAn interface, consisting of a label and additional content, that you display when the content of your app is unavailable to users.
- ImageA view that displays an image.
- LabelA standard label for user interface items, consisting of an icon with a title.
- LabeledContentA container for attaching a label to a value-bearing view.
- ProgressViewA view that shows the progress toward completion of a task.
- TextA view that displays one or more lines of read-only text.
Controls
- ButtonA control that initiates an action.
- ColorPickerA control used to select a color from the system color picker UI.
- DatePickerA control for selecting an absolute date.
- DisclosureGroupA view that shows or hides another content view, based on the state of a disclosure control.
- MultiDatePickerA control for picking multiple dates.
- OutlineGroupA structure that computes views and disclosure groups on demand from an underlying collection of tree-structured, identified data.
- PasteButtonA system button that reads items from the pasteboard and delivers it to a closure.
- PickerA control for selecting from a set of mutually exclusive values.
- SecureFieldA control into which people securely enter private text.
- SliderA control for selecting a value from a bounded linear range of values.
- StepperA control that performs increment and decrement actions.
- SubscriptionViewA view that subscribes to a publisher with an action.
- TableA container that presents rows of data arranged in one or more columns, optionally providing the ability to select one or more members.
- TextEditorA view that can display and edit long-form text.
- TextFieldA control that displays an editable text interface.
- ToggleA control that toggles between on and off states.
Lists and collections
- ForEachA structure that computes views on demand from an underlying collection of identified data.
- FormA container for grouping controls used for data entry, such as in settings or inspectors.
- ListA container that presents rows of data arranged in a single column, optionally providing the ability to select one or more members.
- SectionA container view that you can use to add hierarchy within certain views.
Navigation
- LinkA control for navigating to a URL.
- NavigationLinkA view that controls a navigation presentation.
- NavigationSplitViewA view that presents views in two or three columns, where selections in leading columns control presentations in subsequent columns.
- NavigationStackA view that displays a root view and enables you to present additional views over the root view.
- ShareLinkA view that controls a sharing presentation.
- TabThe content for a tab and the tab's associated tab item in a tab view.
- TabsTabbed navigation (SwiftUI TabView with Tab). Each Trigger declares a tab; the Content with the same value is its page.
- TabSectionA container that you can use to add hierarchy within a tab view.
- TabViewA view that switches between multiple child views using interactive user interface elements.
Toolbars
- DefaultToolbarItemA toolbar item that represents a system component.
- ToolbarItemA model that represents an item which can be placed in the toolbar or navigation bar.
- ToolbarItemGroupA model that represents a group of ToolbarItems which can be placed in the toolbar or navigation bar.
- ToolbarOverflowMenuThe overflow menu of a toolbar.
- ToolbarSpacerA standard space item in toolbars.
- ToolbarTitleMenuThe title menu of a toolbar.
Presentation
Shapes
- AnyShapeA type-erased shape value.
- CapsuleA capsule shape aligned inside the frame of the view containing it.
- CircleA circle centered on the frame of the view containing it.
- ConcentricRectangleA shape whose corners you configure, individually or uniformly, to be squared, rounded, or concentric relative to a container shape's corners.
- ContainerRelativeShapeA shape that is replaced by an inset version of the current container shape. If no container shape was defined, is replaced by a rectangle.
- DefaultGlassEffectShapeThe default shape applied by glass effects, a capsule.
- EllipseAn ellipse aligned inside the frame of the view containing it.
- OffsetShapeA shape with a translation offset transform applied to it.
- PathThe outline of a 2D shape.
- RectangleA rectangular shape aligned inside the frame of the view containing it.
- RotatedShapeA shape with a rotation transform applied to it.
- RoundedRectangleA rectangular shape with rounded corners, aligned inside the frame of the view containing it.
- ScaledShapeA shape with a scale transform applied to it.
- TransformedShapeA shape with an affine transform applied to it.
- UnevenRoundedRectangleA rectangular shape with rounded corners with different values, aligned inside the frame of the view containing it.
Colors and gradients
- AngularGradientAn angular gradient.
- ColorA representation of a color that adapts to a given context.
- EllipticalGradientA radial gradient that draws an ellipse.
- LinearGradientA linear gradient.
- MeshGradientA two-dimensional gradient defined by a 2D grid of positioned colors.
- RadialGradientA radial gradient.
Drawing and shapes
Animation
State and environment
- AppStorageA property wrapper type that reflects a value from UserDefaults and invalidates a view on a change in value in that user default.
- EnvironmentA property wrapper that reads a value from a view's environment.
- ScaledMetricA dynamic property that scales a numeric value.
- SceneStorageA property wrapper type that reads and writes to persisted, per-scene storage.
Documents
Views
- ArrangementViewA view that arranges primary and secondary content using an adaptive layout that responds to the environment.
- ControlGroupA container view that displays semantically-related controls in a visually-appropriate manner for the context
- DividerA visual element that can be used to separate other content.
- EditButtonA button that toggles the edit mode environment value.
- EmptyViewA view that doesn't contain any content.
- GaugeA view that shows a value within a range.
- GroupA type that collects multiple instances of a content type --- like views, scenes, or commands --- into a single unit.
- GroupBoxA stylized view, with an optional label, that visually collects a logical grouping of content.
- RenameButtonA button that triggers a standard rename action.
- SwipeActionsSwipe actions of a list row (SwiftUI swipeActions(edge:allowsFullSwipe:content:)). Place it inside a List.
- TimelineViewA view that updates according to a schedule that you provide.
- ViewThatFitsA view that adapts to the available space by providing the first child view that fits.