Document change date:
Page
32 additions, 32 deletions

Widgets

Widgets help people organize and personalize their devices by displaying timely, glanceable content and offering specific functionality. They appear in various contexts for a consistent experience across platforms. For example, a person might place a Weather widget:

  • On the Home Screen and Lock Screen of their iPhone and iPad

  • On the desktop and Notification Center of their Mac

  • On a horizontal or vertical surface when they wear Apple Vision Pro

  • At a fixed position in the Smart Stack of Apple Watch

Anatomy

Widgets come in different sizes, ranging from small accessory widgets on iPhone, iPad, and Apple Watch to system family widgets that include an extra large size on iPad, Mac, and Apple Vision Pro. Additionally, widgets adapt their appearance to the context in which they appear and respond to a person’s device customization. Consider the following aspects when you design widgets:

  • The widget size to support

  • The context — devices and system experiences — in which the widget may appear

  • The rendering modes and color treatment that the widget receives based on the size and context

The WidgetKit framework provides default appearances and treatments for each widget size to fit the system experience or device where it appears. However, it’s important to consider creating a custom widget design that can provide the best experience for your content in each specific context.

System family widgets

System family widgets offer a broad range of sizes and may include one or more interactive elements.

The following table shows supported contexts for each system family widget size:

Widget size

iPhone

iPad

Mac

Apple Vision Pro

System small

Home Screen, Today View, StandBy, and CarPlay

Home Screen, Today View, and Lock Screen

Desktop and Notification Center

Horizontal and vertical surfaces

System medium

Home Screen and Today View

Home Screen and Today View

Desktop and Notification Center

Horizontal and vertical surfaces

System large

Home Screen and Today View

Home Screen and Today View

Desktop and Notification Center

Horizontal and vertical surfaces

System extra large

Not supported

Home Screen and Today View

Desktop and Notification Center

Horizontal and vertical surfaces

System extra large portrait

Not supported

Not supported

Not supported

Horizontal and vertical surfaces

Accessory widgets

Accessory widgets display a very limited amount of information because of their size.

They appear on the following devices:

Widget size

iPhone

iPad

Apple Watch

Accessory circular

Lock Screen

Lock Screen

Watch complications and in the Smart Stack

Accessory corner

Not supported

Not supported

Watch complications

Accessory inline

Lock Screen

Lock Screen

Watch complications

Accessory rectangular

Lock Screen

Lock Screen

Watch complications and in the Smart Stack

Appearances

A widget can appear in full-color, in monochrome with a tint color, or in a clear, translucent style. Depending on the location, device, and a person’s customization, the system may apply a tinted or clear appearance to the widget and its included full-color images, symbols, and glyphs.

For example, a small system widget appears differently depending on the device and location:

  • On the Home Screen of iPhone and iPad, people choose from different appearances for widgets: light, dark, clear, and tinted. In light and dark appearances, widgets have a full-color design. In a clear appearance, the system desaturates the widget and adds translucency, highlights, and the Liquid Glass material. In a tinted appearance, the system desaturates the widget and its content, then applies a person’s selected tint color.

  • On Apple Vision Pro, the widget appears as a 3D object, surrounded by a frame. It takes on a full-color appearance with a glass- or paper-like coating layer that responds to lighting conditions. Additionally, people can choose a tinted appearance that applies a color from a set of system-provided color palettes.

  • On the Lock Screen of iPad, the widget takes on a monochromatic appearance without a tint color.

  • On the Lock Screen of iPhone in StandBy, the widget appears scaled up in size with the background removed. When the ambient light falls below a threshold, the system renders the widget with a monochromatic red tint.

Similarly, a rectangular accessory widget appears as follows:

  • On the Lock Screen of iPhone and iPad, it takes on a monochromatic appearance without a tint color.

  • On Apple Watch, the widget can appear as a watch complication in both full-color and tinted appearances, and it can also appear in the Smart Stack.

Each appearance described above includes a rendering mode that depends on the platform and a person’s appearance settings:

  • The system uses the full colorfull color rendering mode for system family widgets across all platforms to display your widget in full color. It doesn’t change the color of your views.

  • The system uses the accentedaccented rendering mode for system family widgets across all platforms and for accessory widgets on Apple Watch. In the accented rendering mode, the system removes the background and replaces it with a tinted color effect for a tinted appearance and a Liquid Glass background for a clear appearance. Additionally, it divides the widget’s views into an accent group and a primary group, and then applies a solid color to each group.

  • The system uses the vibrantvibrant rendering mode for widgets on the Lock Screen of iPhone and iPad, and on iPhone in StandBy in low-light conditions. It desaturates text, images, and gauges, and creates a vibrant effect by coloring your content appropriately for the Lock Screen background or a macOS desktop. Note that people can customize the Lock Screen with a tint color, and the system applies a red tint for widgets that appear on iPhone in StandBy in low-light conditions.

The following table lists the occurrences for each rendering mode per platform:

Platform

Full-color

Accented

Vibrant

iPhone

Home Screen, Today view, StandBy and CarPlay (with the background removed)

Home Screen and Today view

Lock Screen, StandBy in low-light conditions

iPad

Home Screen and Today view

Home Screen and Today view

Lock Screen

Apple Watch

Smart Stack, complications

Smart Stack, complications

Not supported

Mac

Desktop and Notification Center

Not supported

Desktop

Apple Vision Pro

Horizontal and vertical surfaces

Horizontal and vertical surfaces

Not supported

For additional design guidance, see Rendering modes. For developer guidance, see Preparing widgets for additional platforms, contexts, and appearancesPreparing widgets for additional platforms, contexts, and appearances and WidgetRenderingModeWidgetRenderingMode.

Best practices

Choose simple ideas that relate to your app’s main purpose. Include timely content and relevant functionality. For example, people who use the Weather app are often most interested in the current high and low temperatures and weather conditions, so the Weather widgets prioritize this information.

Aim to create a widget that gives people quick access to the content they want. People appreciate widgets that display meaningful content and offer useful actions and deep links to key areas of your app. Replicating an app icon offers little additional value, and people may be less likely to keep it on their screens.

Prefer dynamic information that changes throughout the day. If a widget’s content never appears to change, people may not keep it in a prominent position. Although widgets don’t update from minute to minute, it’s important to find ways to keep their content fresh to invite frequent viewing.

Look for opportunities to surprise and delight. For example, you might design a unique visual treatment for your calendar widget to display on meaningful occasions, like birthdays or holidays.

Offer widgets in multiple sizes when doing so adds value. Small widgets use their limited space to typically show a single piece of information while larger sizes support additional layers of information and actions. Avoid expanding a smaller widget’s content to simply fill a larger area. It’s more important to create one widget in the size that best represents the content than providing the widget in all sizes.

Balance information density. Sparse layouts can make the widget seem unnecessary, while overly dense layouts are less glanceable. Create a layout that provides essential information at a glance and allows people to view additional details by taking a longer look. If your layout is too dense, consider improving its clarity by using a larger widget size or replacing text with graphics.

Display only the information that’s directly related to the widget’s main purpose. In larger widgets, you can display more data — or more detailed visualizations of the data — but you don’t want to lose sight of the widget’s primary purpose. For example, all Calendar widgets display a person’s upcoming events. In each size, the widget remains centered on events while expanding the range of information as the size increases.

Use brand elements thoughtfully. Incorporate brand colors, typefaces, and stylized glyphs to make your widget recognizable but don’t overpower useful information or make your widget look out of place. When you include brand elements, people seldom need your logo or app icon to help them recognize your widget. If your widget benefits from including a small logo — for example, if your widget displays content from multiple sources — a small logo in the top-right corner is sufficient.

Choose between automatically displaying content and letting people customize displayed information. In some cases, people need to configure a widget to ensure it displays the information that’s most useful for them. For example, the Stocks widget lets people select the stocks they wish to track. In contrast, some widgets — like the Podcasts widget — automatically display recent content, so people don’t need to customize them. For developer guidance, see Making a configurable widgetMaking a configurable widget.

Avoid mirroring your widget’s appearance within your app. Including an element in your app that looks like your widget but doesn’t behave like it can confuse people. Additionally, people may be less likely to try other ways to interact with such an element in your app because they expect it to behave like a widget.

Let people know when authentication adds value. If your widget provides additional functionality when someone is signed in to your app, make sure people know that. For example, an app that shows upcoming reservations might include a message like “Sign in to view reservations” when people are signed out.

Updating widget content

To remain relevant and useful, widgets periodically refresh their information but don’t support continuous, real-time updates, and the system may adjust the limits for updates depending on various factors.

Keep your widget up to date. Finding the appropriate update frequency for your widget depends on knowing how often the data changes and estimating when people need to see new data. For example, a widget that provides information about tidal conditions at a beach is useful if it updates on an hourly basis even though conditions change constantly. If people are likely to check your widget more frequently than you can update it, consider displaying text that describes when the data was last updated.

Use system functionality to refresh dates and times in your widget. Because widget update frequency is limited, let the system automatically refresh date and time information to preserve update opportunities. Determine the update frequency that fits with the data you display and show content quickly without hiding stale data behind placeholder content. For developer guidance about widget updates, see Keeping a widget up to dateKeeping a widget up to date.

Use animated transitions to bring attention to data updates. By default, many SwiftUI views animate content updates. Additionally, use standard and custom animations with a duration of up to two seconds to let people know when new information is available or when content displays differently. For developer guidance, see Animating data updates in widgets and Live ActivitiesAnimating data updates in widgets and Live Activities.

Adding interactivity

People tap or click a widget to launch its corresponding app. It can also include buttons and toggles to offer additional functionality without launching the app. For example, the Reminders widget includes toggles to mark a task as completed. When people interact with your widget in areas that aren’t buttons or toggles, the interaction launches your app.

Offer simple, relevant functionality and reserve complexity for your app. Useful widgets offer an easy way to complete a task or action that’s directly related to its content.

Ensure that a widget interaction opens your app at the right location. Deep link to details and actions that directly relate to the widget’s content, and don’t make people navigate to the relevant area in the app. For example, when people click or tap a medium Stocks widget, the Stocks app opens to a page that displays information about the symbol.

Offer interactivity while remaining glanceable and uncluttered. Multiple interaction targets — SwiftUI links, buttons, and toggles — might make sense for your content, but avoid creating app-like layouts in your widgets. Pay attention to the size of targets and make sure people can tap or click them with confidence and without accidentally performing unintended interactions. Note that inline accessory widgets offer only one tap target.

Choosing margins and padding

Widgets scale to adapt to the screen sizes of different devices and onscreen areas. Supply content at appropriate sizes to make sure that your widget looks great on every device and let the system resize or scale it as necessary. In iOS, the system ensures that your widget looks good on small devices by resizing the content you design for large devices. In iPadOS, the system renders your widget at a large size before scaling it down for display on the Home Screen.

As you design for various devices and scale factors, use the values listed in Specifications and the Apple Design Resources for guidance; for your production widget, use SwiftUISwiftUI to ensure flexibility.

In general, use standard margins to ensure legibility. Use the standard margin width for widgets — 16 points for most widgets — to avoid crowding their edges and creating a cluttered appearance. If you need to use tighter margins — for example, to create content groupings for graphics, buttons, or background shapes — setting margins of 11 points can work well. Additionally, note that widgets use smaller margins on the desktop on Mac and on the Lock Screen, including in StandBy. For developer guidance, see padding(_:_:)padding(_:_:).

Coordinate the corner radius of your content with the corner radius of the widget. To ensure that your content looks good within a widget’s rounded corners, use a SwiftUI container to apply the correct corner radius. For developer guidance, see ContainerRelativeShapeContainerRelativeShape.

Displaying text in widgets

Prefer using the system font, text styles, and SF Symbols. Using the system font helps your widget look at home on any platform, while making it easier for you to display great-looking text in a variety of weights, styles, and sizes. Use SF Symbols to align and scale symbols with text that uses the system font. If you use a custom font, do so sparingly, and be sure it’s easy for people to read at a glance. It often works well to use a custom font for the large text in a widget and SF Pro for the smaller text. For guidance, see Typography and SF Symbols.

Avoid very small font sizes. In general, display text using fonts at 11 points or larger. Text in a font that’s smaller than 11 points can be too hard for many people to read.

Avoid rasterizing text. Always use text elements and styles to ensure that your text scales well and to allow VoiceOver to speak your content.