To build a custom iPhone widget from scratch, work in a fixed order: decide the one piece of information it must show, pick the smallest size that holds it, lay it out inside Apple's 16-point margins, and design what it shows before its data arrives. A widget is not a small app. iOS renders it as a snapshot and, by Apple's own figures, refreshes a frequently viewed widget only 40 to 70 times a day, so every design choice has to survive data that is slightly old.
What is an iPhone widget, technically?
An iPhone widget is a sequence of pre-rendered snapshots, not a running program. Its code supplies a timeline of entries, WidgetKit renders the SwiftUI views for each entry in a separate process, and the system displays the stored result when each entry's date comes round, as Apple describes in Keeping a widget up to date. Between reloads, none of the widget's code runs.
Reloads come out of a budget. Apple says a widget someone views often typically gets 40 to 70 refreshes per 24 hours, roughly one every 15 to 60 minutes, and every widget instance you place has its own budget. Some reloads cost nothing: while the widget's app is in the foreground, when a button in the widget performs an action, and when the system locale or text size changes. A widget on a Home Screen page you rarely open may be reloaded less often.
Two design rules follow. Anything that should move faster than every quarter of an hour needs to be a date the system draws by itself, such as a countdown or "12 minutes ago", which SwiftUI keeps updating on screen without a reload (displaying dynamic dates); anything else will lag. And because the widget will often show data that is a little old, it should say how old.
Which sizes can a widget take on iPhone?
A widget takes one of the fixed families iOS defines, and the exact point size depends on the iPhone's screen. The ranges below come from the specification tables in Apple's Human Interface Guidelines for widgets, which list every supported screen size.
| Family | Size on iPhone (points) | Where it appears | Buttons and toggles |
|---|---|---|---|
| Small | 141×141 to 170×170 | Home Screen, Today View, StandBy, CarPlay | Yes |
| Medium | 292×141 to 364×170 | Home Screen, Today View | Yes |
| Large | 292×311 to 364×382 | Home Screen, Today View | Yes |
| Lock Screen circular | 68×68 to 76×76 | Lock Screen, below the clock | Yes |
| Lock Screen rectangular | 153×68 to 172×76 | Lock Screen, below the clock | Yes |
| Lock Screen inline | 225×26 to 257×26 | Lock Screen, above the clock | No, a single tap target |
iOS 27 adds an extra-large Home Screen size on iPhone, according to Apple's What's new in iOS 27, but only for apps that offer it; Apple's Home Screen customization help notes that some apps provide just small and medium. StandBy shows the small family scaled up with its background removed. The Lock Screen draws accessory widgets in a desaturated, vibrant style that adapts to the wallpaper, so a full-color Lock Screen design is not possible.
What can't a widget do?
A widget cannot scroll, play video or accept typing. Apple's list of SwiftUI views that work in widgets covers stacks, grids, text, images, shapes, gradients and a few others, with no scroll view, no text field and no video player, and it rules out UIKit views wrapped for SwiftUI.
Interaction is limited to buttons and toggles. Since iOS 17 they run an App Intent, an action the app exposes to the system, without opening the app, and a tap anywhere else launches the app (adding interactivity to widgets). On a locked iPhone those controls stay inactive until the owner unlocks it, and an inline Lock Screen widget offers only one tap target.
Motion is restrained as well. The HIG suggests animated transitions of up to two seconds to signal that new data arrived. When something changes second by second, such as a delivery on its way, Apple points to Live Activities instead of widgets.
How do you design a widget from scratch, step by step?
Design it in five passes, each answering one question before the next begins. The order matters because every later choice depends on the earlier one: you cannot pick a size before you know the data, and you cannot draw a believable empty state before you know the layout.
- Decide the data. Write down the single question the widget answers at a glance, such as "how many days until the trip" or "what is next on my calendar".
- Pick the size. Take the smallest family that holds the answer and its label. Do not stretch a small design to fill a large one.
- Lay it out. Keep 16-point margins, 11 for tight groupings, set text at 11 points or larger, and let corners follow the widget's own radius.
- Design the states. Draw the loading placeholder, the empty state, the offline state and a "last updated" label, because the widget will spend real time in each.
- Test on a device. Place it on a real page, switch the Home Screen to Dark and Tinted, add the Lock Screen version if there is one, and wait through at least one real refresh.
| Pass | Question to answer | Rule from Apple's guidance | What goes wrong if you skip it |
|---|---|---|---|
| Data | What does someone look for in under a second? | A small widget typically shows a single piece of information | A dashboard nobody reads |
| Size | What is the smallest family that fits the answer and its label? | Do not expand a small widget's content to fill a larger area | Dead space, or text squeezed below legibility |
| Layout | Which margins, which type sizes, which corners? | 16-point margins, 11-point minimum text, corners matched to the widget | Crowded edges and labels too small to read |
| States | What shows while loading, with no data, offline, or late? | Placeholder shapes while data loads; show when data last updated | Blank tiles, or old numbers that look current |
| Test | Does it hold on the Lock Screen, in Tinted mode, after a refresh? | Tinted, Clear and Lock Screen rendering desaturate full color | A design that only works in the editor |
The states pass is the one people skip. The HIG's model for a placeholder is static parts of the layout plus semi-opaque bars where text will appear, and its advice for data people check more often than it can refresh is a visible time of the last update.
Building it on WidgetCraft's blank canvas
WidgetCraft, an iPhone and iPad app for iOS 18 and later, turns a design built in its editor into a real WidgetKit widget, and its blank canvas follows the same order. Creation Center asks for the size before anything else: Home Small, Home Medium, Home Large, Lock Circular, Lock Rectangular or Lock Inline.
A design is a tree of layers. Containers, meaning vertical, horizontal and layered stacks plus a grid, hold text, arc text, images, GIFs, dates, charts, buttons and shapes. Relative positioning and a Flexible size with a maximum let a long value shrink instead of overflowing, a Show Grid switch helps with alignment, and Clip to Edges shows at design time what iOS will crop.
Data comes next. Text and number layers bind to weather, location, battery, storage, Health, Calendar, date and time, an HTTP API or a JavaScript snippet, and a Data Provider binding takes a fallback value: the empty state from pass four, written into the widget. The Date layer draws times, relative times, offsets and countdowns with SwiftUI's self-updating date styles, so a countdown keeps moving between reloads instead of spending them. Buttons run through an App Intent and can open another app, play a sound or open a URL, and the preview flips between Light, Dark and Auto.
The details of each layer and binding are in how WidgetCraft's layers and data sources work, and the three ways to start a WidgetCraft widget compares the blank canvas with templates and community imports.
Where WidgetCraft's canvas stops
WidgetCraft cannot remove the platform's limits, and it has a few of its own. Its Home Screen widget comes in small, medium and large only, so the extra-large slot iOS 27 introduced is not available to its designs. The editor estimates the decoded memory of every image and GIF and warns above 15 MB, the point at which a widget can be killed before it renders; a 400 × 400 GIF with 60 frames decodes to about 38 MB however small the file is.
The free tier keeps one saved widget per size, and Pro, sold as a monthly or yearly subscription or a one-time lifetime purchase, removes that cap and opens the VIP designs. The refresh budget still applies: by default a WidgetCraft widget asks iOS for a new timeline 15 minutes after each render, and iOS decides when it arrives. If a finished design is missing or shows stale numbers, the guide to WidgetCraft widgets that won't show or update works through each cause, and making aesthetic iPhone Home Screen widgets covers color, type and the Tinted mode.
When a widget is the wrong tool
Some information should not live in a widget at all, and the refresh budget is usually the reason. Use this test before you start.
- It changes every few seconds. A live score or a timer you need to pause belongs in a Live Activity or the app.
- It needs typing, scrolling or a long list of choices. Put the task in the app and let the widget open it at the right screen.
- The app that owns the data already ships a widget. That widget has the app's own data access; a widget builder only shows what it can reach itself, such as Calendar, Health, weather or a URL you supply.
- It answers more than one question. Split it into two small widgets or a Smart Stack rather than one crowded large one.
If the information changes on the scale of minutes or hours and answers one question at a glance, build the widget. WidgetCraft is on the App Store if you want to start from its blank canvas.