PadCodedocs

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 rowModifier
Font, Typeface, Weight, DesignFont, Font Weight, Font Design
Color (Text)Color
Align (Text), Max lines, Letter spacing, CaseText Alignment, Max Lines, Letter Spacing, Letter Case
Bold, Italic, Underline, StrikethroughBold, Italic, Underline, Strikethrough
Padding, SidesPadding
Width, Height, Align (Size & spacing)Size
OffsetOffset
BackgroundBackground
CornersCrop to Shape, and the shape of the background, border and glass
BorderOverlay
Shadow, Opacity, Liquid GlassShadow, Opacity, Liquid Glass
Style, Accent, Size (Control)A style modifier like Button Style, Accent Color, Control Size
DisabledDisabled
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.

Show & enable and All modifiers, open for a button: a Button Style row and an Accent Color row, then Add modifier.

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

  1. Select the view.
  2. In the Inspector's Style tab, open All modifiers and tap Add modifier.
  3. In Add Modifier, search (Search modifiers) or browse the groups, and tap the one you want.
Add Modifier: every modifier for the selected view, by group, with a search field.

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:

CommandWhat it does
Move UpMoves it one place up, so it applies earlier.
Move DownMoves it one place down, so it applies later.
RemoveTakes 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

ModifierWhat it doesWorks on
Accent ColorThe color its buttons, switches and other controls use for their highlights.Every view
BackgroundA color, gradient or views drawn behind it, optionally in a shape like a circle.Every view
Built-In BackgroundShows or hides the gray backdrop that lists, forms and text areas come with.Every view
ColorThe color of its text, icons and shapes; on a stack, it colors everything inside.Every view
Control SizeHow big buttons, switches and other controls inside it are, from mini to extra large.Every view
HiddenHides it, but keeps its space empty.Every view
Light or DarkShows it, and everything inside it, in Light or Dark mode.Every view
OverlayA color, gradient or views drawn on top of it, optionally in a shape like a circle.Every view
Row BackgroundA color or views behind its row in a list.Every view

#Auxiliary view

ModifierWhat it doesWorks on
Hide Back ButtonHides the back button at the top of the page, so people can't go back that way.Every view
Page TitleThe title in the bar at the top of the page.Every view

#Graphics and rendering

ModifierWhat it doesWorks on
Aspect RatioKeeps its width-to-height shape, like 1.78 for 16:9, fitting or filling the space.Every view
BlurMakes it blurry; bigger numbers blur more.Every view
Clock HandTurns 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 ShapeCrops it to a shape, like a circle or capsule, hiding anything outside.Every view
Icon SizeMakes its SF Symbol icons small, medium or large compared with the text around them.Every view
OpacityHow see-through it is, from 0 (invisible) to 1 (solid).Every view
RotationTurns it around its center by an angle, like 45 degrees.Every view
ScaleMakes it look bigger or smaller, like 1.5 for half again as big, without moving anything around it.Every view
Scale to FillGrows it to cover all of its space, keeping its shape, so parts may spill past the edges.Every view
Scale to FitGrows or shrinks it to fit inside its space, keeping its shape, so nothing is cut off.Every view
ShadowA soft shadow behind it, so it looks raised.Every view

#Image

ModifierWhat it doesWorks on
Image ColoringTemplate paints an image in one color you pick; Original keeps its own colors.Image
ResizableLets an image stretch to the size you give it (keep it first in the list).Image

#Input and event

ModifierWhat it doesWorks on
DisabledStops it responding to taps, and grays out buttons and other controls.Every view
When Apple Pencil Is Double-TappedRuns actions when someone double-taps the side of their Apple Pencil.Every view
When Apple Pencil Is SqueezedRuns actions when someone squeezes an Apple Pencil Pro.Every view
When HiddenRuns actions each time it leaves the screen.Every view
When HoveredRuns actions when a trackpad pointer or Apple Pencil hovers over it, and again when it leaves.Every view
When LoadingRuns actions when it appears, like loading data, and stops them if it leaves first.Every view
When Long-PressedRuns actions when it's touched and held, for half a second unless you set Hold For.Every view
When Pulled to RefreshRuns actions when people pull a list or scroll area down to refresh it.Every view
When Return Is PressedRuns actions when Return is pressed in a text field inside it.Every view
When ShownRuns actions each time it appears on screen.Every view
When TappedRuns actions when it's tapped, or double-tapped if you set Count to 2.Every view
When a Value ChangesRuns actions each time a variable you pick changes, like the one a slider moves.Every view

#Layout

ModifierWhat it doesWorks on
Adaptive Pair StyleHow an Adaptive Pair places its two views: side by side when there's room, or the second floating over the first.Every view
Column SpanInside a Grid, how many columns it stretches across, like 2 for a wide cell.Every view
Edge to EdgeStretches it under the status bar and the screen's edges.Every view
Layer OrderWhich item sits on top when items overlap; higher numbers come to the front.Every view
OffsetMoves it without changing the layout around it.Every view
PaddingEmpty space around its content, like 16 points on every side.Every view
SizeIts width and height in points: exact, or the smallest and largest it can be.Every view
Space PriorityWho gets room first when a row or column runs short, so its text isn't cut off.Every view

#Shape

ModifierWhat it doesWorks on
FillThe color or gradient inside a shape.Shapes
Inner OutlineA line just inside a shape's edge, so none of it gets cut off.Shapes
OutlineA line along a shape's edge, half inside it and half outside.Shapes

#State

ModifierWhat it doesWorks on
Option ValueThe value a picker saves when this option is chosen; each option needs its own.Every view

#Style

ModifierWhat it doesWorks on
Button Group StyleHow a Button Group shows its buttons: spread out side by side, or close together with their words.Every view
Button StyleHow buttons inside it look: plain, bordered, prominent or Liquid Glass.Every view
Date Picker StyleHow date pickers inside it look: a compact button, a full calendar or wheels.Every view
Form StyleHow a Form lays out its rows: in rounded groups, or in columns.Every view
Gauge StyleHow gauges inside it look: a ring or a bar, filling up or marked with a dot.Every view
Label StyleWhether labels inside it show their icon, their text, or both.Every view
Liquid GlassPuts Apple's Liquid Glass behind it, in a capsule unless you pick a shape.Every view
List StyleHow lists inside it look: plain, grouped, inset, inset grouped or sidebar.Every view
Picker StyleHow pickers inside it look: a menu, segments, a wheel or a list.Every view
Progress StyleWhether progress bars and loaders inside it show as a round spinner or a bar.Every view
Sidebar Layout StyleHow a Sidebar Layout shares the screen: the sidebar beside the detail, or the detail kept full size.Every view
Switch StyleHow switches inside it look: a sliding switch or a button that stays pressed while on.Every view
Tabs StyleHow Tabs show their pages: with a tab bar, or as pages to swipe through.Every view
Text Field StyleHow text fields inside it look: a rounded box, or plain text with no box.Every view

#Text and symbol

ModifierWhat it doesWorks on
Auto CapitalsWhether the keyboard capitalizes each sentence, each word, every letter, or nothing in text fields inside it.Every view
Autocorrect OffStops the keyboard fixing spelling in text fields inside it, handy for names and codes.Every view
BoldMakes its text bold.Every view
Even-Width NumbersGives every digit the same width, so timers and prices don't jiggle as they change.Every view
FontThe text style, like Title or Body, or an exact size and weight.Every view
Font DesignThe letter shapes: default, rounded, serif or monospaced (every letter the same width).Every view
Font WeightHow thick the letters are, from Ultralight to Black.Every view
Icon ColorsHow its SF Symbol icons use color: one color, shades of one color, or the icon's own colors.Every view
ItalicMakes its text slanted (italic).Every view
Keyboard TypeWhich keyboard opens for text fields inside it, like numbers or email.Every view
Letter CaseShows its text in UPPERCASE or lowercase without changing what you typed.Every view
Letter SpacingExtra space between letters, in points; negative numbers squeeze them together.Every view
Letter TrackingExtra space after every letter, like Letter Spacing but it also splits joined letters (fi).Every view
Line SpacingExtra space between lines of text, in points.Every view
Max LinesThe most lines its text can use before it ends with “…”.Every view
MonospacedGives every letter the same width, like a typewriter.Every view
StrikethroughDraws a line through its text, like a crossed-off task.Every view
Text AlignmentLines up its text on the left, center or right when it wraps onto several lines.Every view
UnderlineDraws a line under its text.Every view