Modifiers
Every modifier you can add to a view, by group.
A modifier is one change to a view: a bit of padding, a background, a shadow, a font, a page title. A view can have any number of them, applied in order from top to bottom. They're how you style a view beyond the settings it comes with, and the tables below list every one you can add.
#Modifiers and the Style tab
You've used modifiers already. Many rows in the Inspector's Style tab are modifiers under the hood: set Padding in Size & spacing and the view gets a Padding modifier; set a Background in Look and it gets a Background. Some triggers you pick in the Actions tab are modifiers too, like When Tapped on a Text.
| Style tab row | Modifier |
|---|---|
| Font, Typeface, Weight, Design | Font, Font Weight, Font Design |
| Color (Text) | Color |
| Align (Text), Max lines, Letter spacing, Case | Text Alignment, Max Lines, Letter Spacing, Letter Case |
| Bold, Italic, Underline, Strikethrough | Bold, Italic, Underline, Strikethrough |
| Padding, Sides | Padding |
| Width, Height, Align (Size & spacing) | Size |
| Offset | Offset |
| Background | Background |
| Corners | Crop to Shape, and the shape of the background, border and glass |
| Border | Overlay |
| Shadow, Opacity, Liquid Glass | Shadow, Opacity, Liquid Glass |
| Style, Accent, Size (Control) | A style modifier like Button Style, Accent Color, Control Size |
| Disabled | Disabled |
| Fill, Outline (Shape) | Fill, Inner Outline (or Outline on a Concentric Rectangle) |
The Style tab's sections are the quick way to set the common ones. Modifiers give you everything else, and full control over the order.
#See a view's modifiers
Select a view and scroll to the bottom of the Inspector's Style tab. All modifiers · N lists every modifier on the view, in order (N is how many). It's closed at first; tap its title to open it.
Each row shows the modifier's name and, under it, a summary of its value. Tap a row to open its settings, and again to close them. A row only shows the settings PadCode draws.
#Add a modifier
- Select the view.
- In the Inspector's Style tab, open All modifiers and tap Add modifier.
- In Add Modifier, search (Search modifiers) or browse the groups, and tap the one you want.
The modifier goes at the bottom of the list, open, so you can set it up right away. Add Modifier only offers modifiers that work on the selected view and that the canvas draws, so whatever you add shows up as you design.
#Order matters
Modifiers apply from top to bottom, each one to the result of those above it. The same modifiers in a different order can look different:
- Padding, then Background: the background covers the padding too, so you get a colored card with room around the text.
- Background, then Padding: the background hugs the text, and the padding is empty space outside it.
When you set something in the Style tab's sections, PadCode puts its modifier where it reads naturally, like padding before a background. A modifier you add yourself goes at the bottom; move it if it needs to come earlier. If a view has two modifiers of the same kind, the Style tab's sections edit the first one.
#Move or remove a modifier
Each row has a ⋯ menu:
| Command | What it does |
|---|---|
| Move Up | Moves it one place up, so it applies earlier. |
| Move Down | Moves it one place down, so it applies later. |
| Remove | Takes it off the view. |
#Not on canvas yet
A row marked Not on canvas yet, in orange, is a modifier PadCode doesn't draw yet, so you won't see what it does. Add Modifier never offers these.
See also The Inspector.
The tables below list every modifier you can add, by group.
#Appearance
| Modifier | What it does | Works on |
|---|---|---|
| Accent Color | The color its buttons, switches and other controls use for their highlights. | Every view |
| Background | A color, gradient or views drawn behind it, optionally in a shape like a circle. | Every view |
| Built-In Background | Shows or hides the gray backdrop that lists, forms and text areas come with. | Every view |
| Color | The color of its text, icons and shapes; on a stack, it colors everything inside. | Every view |
| Control Size | How big buttons, switches and other controls inside it are, from mini to extra large. | Every view |
| Hidden | Hides it, but keeps its space empty. | Every view |
| Light or Dark | Shows it, and everything inside it, in Light or Dark mode. | Every view |
| Overlay | A color, gradient or views drawn on top of it, optionally in a shape like a circle. | Every view |
| Row Background | A color or views behind its row in a list. | Every view |
#Auxiliary view
| Modifier | What it does | Works on |
|---|---|---|
| Hide Back Button | Hides the back button at the top of the page, so people can't go back that way. | Every view |
| Page Title | The title in the bar at the top of the page. | Every view |
#Graphics and rendering
| Modifier | What it does | Works on |
|---|---|---|
| Aspect Ratio | Keeps its width-to-height shape, like 1.78 for 16:9, fitting or filling the space. | Every view |
| Blur | Makes it blurry; bigger numbers blur more. | Every view |
| Clock Hand | Turns it like a clock's hand, from 12 o'clock: round once a minute for a second hand, once an hour for a minute hand, twice a day for an hour hand. On the Home Screen it keeps moving between the widget's updates. | Every view |
| Crop to Shape | Crops it to a shape, like a circle or capsule, hiding anything outside. | Every view |
| Icon Size | Makes its SF Symbol icons small, medium or large compared with the text around them. | Every view |
| Opacity | How see-through it is, from 0 (invisible) to 1 (solid). | Every view |
| Rotation | Turns it around its center by an angle, like 45 degrees. | Every view |
| Scale | Makes it look bigger or smaller, like 1.5 for half again as big, without moving anything around it. | Every view |
| Scale to Fill | Grows it to cover all of its space, keeping its shape, so parts may spill past the edges. | Every view |
| Scale to Fit | Grows or shrinks it to fit inside its space, keeping its shape, so nothing is cut off. | Every view |
| Shadow | A soft shadow behind it, so it looks raised. | Every view |
#Image
| Modifier | What it does | Works on |
|---|---|---|
| Image Coloring | Template paints an image in one color you pick; Original keeps its own colors. | Image |
| Resizable | Lets an image stretch to the size you give it (keep it first in the list). | Image |
#Input and event
| Modifier | What it does | Works on |
|---|---|---|
| Disabled | Stops it responding to taps, and grays out buttons and other controls. | Every view |
| When Apple Pencil Is Double-Tapped | Runs actions when someone double-taps the side of their Apple Pencil. | Every view |
| When Apple Pencil Is Squeezed | Runs actions when someone squeezes an Apple Pencil Pro. | Every view |
| When Hidden | Runs actions each time it leaves the screen. | Every view |
| When Hovered | Runs actions when a trackpad pointer or Apple Pencil hovers over it, and again when it leaves. | Every view |
| When Loading | Runs actions when it appears, like loading data, and stops them if it leaves first. | Every view |
| When Long-Pressed | Runs actions when it's touched and held, for half a second unless you set Hold For. | Every view |
| When Pulled to Refresh | Runs actions when people pull a list or scroll area down to refresh it. | Every view |
| When Return Is Pressed | Runs actions when Return is pressed in a text field inside it. | Every view |
| When Shown | Runs actions each time it appears on screen. | Every view |
| When Tapped | Runs actions when it's tapped, or double-tapped if you set Count to 2. | Every view |
| When a Value Changes | Runs actions each time a variable you pick changes, like the one a slider moves. | Every view |
#Layout
| Modifier | What it does | Works on |
|---|---|---|
| Adaptive Pair Style | How an Adaptive Pair places its two views: side by side when there's room, or the second floating over the first. | Every view |
| Column Span | Inside a Grid, how many columns it stretches across, like 2 for a wide cell. | Every view |
| Edge to Edge | Stretches it under the status bar and the screen's edges. | Every view |
| Layer Order | Which item sits on top when items overlap; higher numbers come to the front. | Every view |
| Offset | Moves it without changing the layout around it. | Every view |
| Padding | Empty space around its content, like 16 points on every side. | Every view |
| Size | Its width and height in points: exact, or the smallest and largest it can be. | Every view |
| Space Priority | Who gets room first when a row or column runs short, so its text isn't cut off. | Every view |
#Shape
| Modifier | What it does | Works on |
|---|---|---|
| Fill | The color or gradient inside a shape. | Shapes |
| Inner Outline | A line just inside a shape's edge, so none of it gets cut off. | Shapes |
| Outline | A line along a shape's edge, half inside it and half outside. | Shapes |
#State
| Modifier | What it does | Works on |
|---|---|---|
| Option Value | The value a picker saves when this option is chosen; each option needs its own. | Every view |
#Style
| Modifier | What it does | Works on |
|---|---|---|
| Button Group Style | How a Button Group shows its buttons: spread out side by side, or close together with their words. | Every view |
| Button Style | How buttons inside it look: plain, bordered, prominent or Liquid Glass. | Every view |
| Date Picker Style | How date pickers inside it look: a compact button, a full calendar or wheels. | Every view |
| Form Style | How a Form lays out its rows: in rounded groups, or in columns. | Every view |
| Gauge Style | How gauges inside it look: a ring or a bar, filling up or marked with a dot. | Every view |
| Label Style | Whether labels inside it show their icon, their text, or both. | Every view |
| Liquid Glass | Puts Apple's Liquid Glass behind it, in a capsule unless you pick a shape. | Every view |
| List Style | How lists inside it look: plain, grouped, inset, inset grouped or sidebar. | Every view |
| Picker Style | How pickers inside it look: a menu, segments, a wheel or a list. | Every view |
| Progress Style | Whether progress bars and loaders inside it show as a round spinner or a bar. | Every view |
| Sidebar Layout Style | How a Sidebar Layout shares the screen: the sidebar beside the detail, or the detail kept full size. | Every view |
| Switch Style | How switches inside it look: a sliding switch or a button that stays pressed while on. | Every view |
| Tabs Style | How Tabs show their pages: with a tab bar, or as pages to swipe through. | Every view |
| Text Field Style | How text fields inside it look: a rounded box, or plain text with no box. | Every view |
#Text and symbol
| Modifier | What it does | Works on |
|---|---|---|
| Auto Capitals | Whether the keyboard capitalizes each sentence, each word, every letter, or nothing in text fields inside it. | Every view |
| Autocorrect Off | Stops the keyboard fixing spelling in text fields inside it, handy for names and codes. | Every view |
| Bold | Makes its text bold. | Every view |
| Even-Width Numbers | Gives every digit the same width, so timers and prices don't jiggle as they change. | Every view |
| Font | The text style, like Title or Body, or an exact size and weight. | Every view |
| Font Design | The letter shapes: default, rounded, serif or monospaced (every letter the same width). | Every view |
| Font Weight | How thick the letters are, from Ultralight to Black. | Every view |
| Icon Colors | How its SF Symbol icons use color: one color, shades of one color, or the icon's own colors. | Every view |
| Italic | Makes its text slanted (italic). | Every view |
| Keyboard Type | Which keyboard opens for text fields inside it, like numbers or email. | Every view |
| Letter Case | Shows its text in UPPERCASE or lowercase without changing what you typed. | Every view |
| Letter Spacing | Extra space between letters, in points; negative numbers squeeze them together. | Every view |
| Letter Tracking | Extra space after every letter, like Letter Spacing but it also splits joined letters (fi). | Every view |
| Line Spacing | Extra space between lines of text, in points. | Every view |
| Max Lines | The most lines its text can use before it ends with “…”. | Every view |
| Monospaced | Gives every letter the same width, like a typewriter. | Every view |
| Strikethrough | Draws a line through its text, like a crossed-off task. | Every view |
| Text Alignment | Lines up its text on the left, center or right when it wraps onto several lines. | Every view |
| Underline | Draws a line under its text. | Every view |