<!--
{
  "availability" : [
    "iOS: 13.0 -",
    "iPadOS: 13.0 -",
    "macCatalyst: 13.0 -",
    "macOS: 10.15 -",
    "tvOS: 13.0 -",
    "visionOS: 1.0 -",
    "watchOS: 6.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI",
  "metadataVersion" : "0.1.0",
  "role" : "Framework",
  "symbol" : {
    "kind" : "Framework",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "SwiftUI"
  },
  "title" : "SwiftUI"
}
-->

# SwiftUI

Declare the user interface and behavior for your app on every platform.

## Overview

SwiftUI provides views, controls, and layout structures for declaring your app’s
user interface. The framework provides event handlers for delivering taps, gestures,
and other types of input to your app, and tools to manage the flow of data from your
app’s models down to the views and controls that users see and interact with.

Define your app structure using the [`App`](/documentation/SwiftUI/App) protocol, and populate it
with scenes that contain the views that make up your app’s user interface.
Create your own custom views that conform to the [`View`](/documentation/SwiftUI/View) protocol, and compose
them with SwiftUI views for displaying text, images, and custom shapes using stacks,
lists, and more. Apply powerful modifiers to built-in views and your own views to
customize their rendering and interactivity. Share code between apps on multiple
platforms with views and controls that adapt to their context and presentation.

![An image of the Landmarks sample app on Mac, iPad, and iPhone showing the Mount Fuji landmark.](images/com.apple.SwiftUI/landmarks-app-article-hero@2x.png)

You can integrate SwiftUI views with objects from the
<doc://com.apple.documentation/documentation/UIKit>,
<doc://com.apple.documentation/documentation/AppKit>, and
<doc://com.apple.documentation/documentation/WatchKit>
frameworks to take further advantage of platform-specific functionality. You can
also customize accessibility support in SwiftUI, and localize your app’s interface
for different languages, countries, or cultural regions.

> Tip: If you’re new to SwiftUI, visit the [SwiftUI Pathway](https://developer.apple.com/swiftui/get-started/). It’s a collection of tutorials, articles, and sample projects that help you get started with SwiftUI.

### Featured samples

[Landmarks: Building an app with Liquid Glass](/documentation/SwiftUI/Landmarks-Building-an-app-with-Liquid-Glass)

Enhance your app experience with system-provided and custom Liquid Glass.

[Wishlist: Planning travel in a SwiftUI app](/documentation/SwiftUI/wishlist-planning-travel-in-a-swiftui-app)

Build a travel planning app that organizes trips into collections
and tracks activity completion.

  <doc://com.apple.documentation/documentation/visionOS/destination-video>

[Building a document-based app with SwiftUI](/documentation/SwiftUI/Building-a-document-based-app-with-SwiftUI)

Create, save, and open documents in a multiplatform app.

## Topics

### Essentials

  <doc://com.apple.documentation/documentation/TechnologyOverviews/adopting-liquid-glass>

  <doc://com.apple.documentation/tutorials/Develop-in-Swift#explore-xcode>

  <doc://com.apple.documentation/documentation/Updates/SwiftUI>

[Landmarks: Building an app with Liquid Glass](/documentation/SwiftUI/Landmarks-Building-an-app-with-Liquid-Glass)

Enhance your app experience with system-provided and custom Liquid Glass.

### App structure

[App organization](/documentation/SwiftUI/App-organization)

Define the entry point and top-level structure of your app.

[Scenes](/documentation/SwiftUI/Scenes)

Declare the user interface groupings that make up the parts of your app.

[Windows](/documentation/SwiftUI/Windows)

Display user interface content in a window or a collection of windows.

[Immersive spaces](/documentation/SwiftUI/Immersive-spaces)

Display unbounded content in a person’s surroundings.

[Documents](/documentation/SwiftUI/Documents)

Enable people to open and manage documents.

[Navigation](/documentation/SwiftUI/Navigation)

Enable people to move between different parts of your app’s view hierarchy
within a scene.

[Modal presentations](/documentation/SwiftUI/Modal-presentations)

Present content in a separate view that offers focused interaction.

[Toolbars](/documentation/SwiftUI/Toolbars)

Provide immediate access to frequently used commands and controls.

[Search](/documentation/SwiftUI/Search)

Enable people to search for text or other content within your app.

[App extensions](/documentation/SwiftUI/App-extensions)

Extend your app’s basic functionality to other parts of the system, like
by adding a Widget.

### Data and storage

[Model data](/documentation/SwiftUI/Model-data)

Manage the data that your app uses to drive its interface.

[Environment values](/documentation/SwiftUI/Environment-values)

Share data throughout a view hierarchy using the environment.

[Preferences](/documentation/SwiftUI/Preferences)

Indicate configuration preferences from views to their container views.

[Persistent storage](/documentation/SwiftUI/Persistent-storage)

Store data for use across sessions of your app.

### Views

[View fundamentals](/documentation/SwiftUI/View-fundamentals)

Define the visual elements of your app using a hierarchy of views.

[View configuration](/documentation/SwiftUI/View-configuration)

Adjust the characteristics of views in a hierarchy.

[View styles](/documentation/SwiftUI/View-styles)

Apply built-in and custom appearances and behaviors to different types of views.

[Animations](/documentation/SwiftUI/Animations)

Create smooth visual updates in response to state changes.

[Text input and output](/documentation/SwiftUI/Text-input-and-output)

Display formatted text and get text input from the user.

[Images](/documentation/SwiftUI/Images)

Add images and symbols to your app’s user interface.

[Controls and indicators](/documentation/SwiftUI/Controls-and-indicators)

Display values and get user selections.

[Menus and commands](/documentation/SwiftUI/Menus-and-commands)

Provide space-efficient, context-dependent access to commands and controls.

[Shapes](/documentation/SwiftUI/Shapes)

Trace and fill built-in and custom shapes with a color, gradient, or other pattern.

[Drawing and graphics](/documentation/SwiftUI/Drawing-and-graphics)

Enhance your views with graphical effects and customized drawings.

### View layout

[Layout fundamentals](/documentation/SwiftUI/Layout-fundamentals)

Arrange views inside built-in layout containers like stacks and grids.

[Layout adjustments](/documentation/SwiftUI/Layout-adjustments)

Make fine adjustments to alignment, spacing, padding, and other layout parameters.

[Custom layout](/documentation/SwiftUI/Custom-layout)

Place views in custom arrangements and create animated transitions between layout types.

[Lists](/documentation/SwiftUI/Lists)

Display a structured, scrollable column of information.

[Tables](/documentation/SwiftUI/Tables)

Display selectable, sortable data arranged in rows and columns.

[View groupings](/documentation/SwiftUI/View-groupings)

Present views in different kinds of purpose-driven containers, like forms or
control groups.

[Scroll views](/documentation/SwiftUI/Scroll-views)

Enable people to scroll to content that doesn’t fit in the current display.

### Event handling

[Gestures](/documentation/SwiftUI/Gestures)

Define interactions from taps, clicks, and swipes to fine-grained gestures.

[Input events](/documentation/SwiftUI/Input-events)

Respond to input from a hardware device, like a keyboard or a Touch Bar.

[Clipboard](/documentation/SwiftUI/Clipboard)

Enable people to move or duplicate items by issuing Copy and Paste commands.

[Drag and drop](/documentation/SwiftUI/Drag-and-drop)

Enable people to move or duplicate items by dragging them from one location to another.

[Focus](/documentation/SwiftUI/Focus)

Identify and control which visible object responds to user interaction.

[System events](/documentation/SwiftUI/System-events)

React to system events, like opening a URL.

### Accessibility

[Accessibility fundamentals](/documentation/SwiftUI/Accessibility-fundamentals)

Make your SwiftUI apps accessible to everyone, including people with
disabilities.

[Accessible appearance](/documentation/SwiftUI/Accessible-appearance)

Enhance the legibility of content in your app’s interface.

[Accessible controls](/documentation/SwiftUI/Accessible-controls)

Improve access to actions that your app can undertake.

[Accessible descriptions](/documentation/SwiftUI/Accessible-descriptions)

Describe interface elements to help people understand what they represent.

[Accessible navigation](/documentation/SwiftUI/Accessible-navigation)

Enable users to navigate to specific user interface elements using rotors.

### Framework integration

[AppKit integration](/documentation/SwiftUI/AppKit-integration)

Add AppKit views to your SwiftUI app, or use SwiftUI views in your AppKit app.

[UIKit integration](/documentation/SwiftUI/UIKit-integration)

Add UIKit views to your SwiftUI app, or use SwiftUI views in your UIKit app.

[WatchKit integration](/documentation/SwiftUI/WatchKit-integration)

Add WatchKit views to your SwiftUI app, or use SwiftUI views in your WatchKit app.

[Technology-specific views](/documentation/SwiftUI/Technology-specific-views)

Use SwiftUI views that other Apple frameworks provide.

### Tool support

[Previews in Xcode](/documentation/SwiftUI/Previews-in-Xcode)

Generate dynamic, interactive previews of your custom views.

[Xcode library customization](/documentation/SwiftUI/Xcode-library-customization)

Expose custom views and modifiers in the Xcode library.

[Performance analysis](/documentation/SwiftUI/Performance-analysis)

Measure and improve your app’s responsiveness.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)
