<!--
{
  "documentType" : "article",
  "framework" : "WidgetKit",
  "identifier" : "/documentation/WidgetKit/SwiftUI-Views",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "SwiftUI views for widgets"
}
-->

# SwiftUI views for widgets

Present your app’s content in widgets with SwiftUI views.

## Overview

Widgets can use many, but not all, SwiftUI views to present content. Use the
views listed below to implement your widget’s view.

> Note: Widgets can’t use UIKit or AppKit views wrapped with <doc://com.apple.documentation/documentation/SwiftUI/UIViewRepresentable> or <doc://com.apple.documentation/documentation/SwiftUI/NSViewRepresentable>.

## Topics

### Displaying text

[Displaying dynamic dates in widgets](/documentation/WidgetKit/Displaying-Dynamic-Dates)

Show up-to-date, time-based information in your widget even when it
isn’t running.

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

### Showing images

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

### Adding interaction

[Adding interactivity to widgets and Live Activities](/documentation/WidgetKit/Adding-interactivity-to-widgets-and-Live-Activities)

Include buttons or toggles in a widget or Live Activity to offer app functionality without launching the app.

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

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

### Adding labels and links

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

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

### Stacking views

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

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

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

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

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

### Arranging views in grids

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

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

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

### Enumerating lists

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

### Grouping views

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

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

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

### Representing hierarchies

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

### Adding spacers and dividers

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

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

### Handling conditional views

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

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

### Displaying shapes

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

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

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

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

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

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

### Transforming views

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

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

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

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

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

### Styling views

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

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

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

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

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

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

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

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

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

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

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

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

### Creating 2D graphics

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

### Managing view geometry

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

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

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

### Substituting views

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

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



---

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)