PadCodedocs

The Inspector

The right panel: a view's settings in Style, its steps in Actions, and the data it uses in Data.

The Inspector is the panel on the right of the Builder. It shows everything about the view you selected: how it looks (Style), what it does (Actions) and the data it reads and changes (Data). With nothing selected, it shows the screen's own settings.

The Inspector's Style tab for a button: its own settings at the top, then Text.

#Open it

Select a view on the canvas or in Layers, and the Inspector shows it. Tap the empty canvas around the device, or press Esc, to select nothing and see the screen instead.

To make room for the canvas, tap the hide button at the top right of the Inspector. Bring it back with Show right panel in the toolbar, or press ⌥⌘0.

#The header

PartWhat it does
NameThe view's name, shown in Layers too. Type to give the view a name of its own, like "Total label"; until you do, the box shows the component's name in gray. Clear it to go back to the component's name.
KindUnder the name: which component this is, like Button.
ⓘWhat this component is: a short description, a preview of how it looks when added, buttons to add another one (Inside, Above, Below or At the end), and Read the docs, its page on padcode.dev.
⋯The arrange menu: Rename, Copy, Cut, Paste, Duplicate, Save as Component…, Wrap in, Unwrap, Move Up, Move Down and Delete.
Hide buttonHides the Inspector.

Wrap in puts the view inside a new Column, Row, Layers, Scroll Area, Box or Group. Unwrap does the opposite for a container: it puts what's inside where the container was. See Laying out views.

#The three tabs

TabWhat's in itShortcut
StyleHow the view looks and sits on the screen: its own settings, then sections every view shares, then every modifier.⌥⌘1
ActionsWhat happens when people use it: pick a trigger (When …) and the steps that run, in order. See How steps run.⌥⌘2
DataThe variables the view changes, repeating it for each item in a list, and the screen's inputs. See The Data tab.⌥⌘3

#Several views selected

Shift-click views on the canvas or in Layers to select more than one. The Inspector then says how many are selected, lists them, and offers what works on all of them at once:

ButtonShortcut
Copy⌘C
Cut⌘X
Duplicate⌘D
Save as Component⇧⌘S
Delete⌘⌫

When the views sit side by side in the same container, Group into… puts them all in a new Column, Row, Layers or Box.

#Nothing selected: the screen

With nothing selected, the header shows the screen's title (type to rename it) and the Style tab shows the Screen section:

SettingWhat it doesChoices
AppearanceWhether this screen is dark or light. Auto follows the iPad's own setting.Auto, Dark, Light
BackgroundThe screen's background color.Color menu or color wheel
AccentThe color of the controls' active parts, like a switch when it's on.Color menu or color wheel
Text colorThe color every text on this screen uses unless it sets its own.Color menu or color wheel
Font styleThe letter shapes every text on this screen uses unless it sets its own.Default, Rounded, Serif, Monospaced

Accent, text color and font style are defaults: every view on the screen uses them unless it sets its own. Under the Screen section, All modifiers lists the screen's modifiers.

#The Style tab

The Style tab lists sections from top to bottom. A view shows only the ones that fit it:

  1. Its own section, named after the component (Button, Column, Slider…): the settings only this kind of view has. An Image has an Image section instead, to pick a photo or a symbol.
  2. An extra section for a few components: Map, Chart, Opens (a Page Link's screen), Mesh Gradient, and Validation for a Text Field or Password Field.
  3. Shape, for shapes like Rectangle and Circle.
  4. Text, for views that show text.
  5. Size & spacing, for every view.
  6. Look, for every view.
  7. Control, for buttons, switches, pickers and other controls.
  8. Show & enable, for every view.
  9. All modifiers, for every view.

Tap a section's title to close it or open it again.

#Help for each setting

Most settings have an ⓘ next to their name. Tap it for a short explanation of what the setting does, often with an example.

#The component's own settings

The first section holds what makes this component what it is: a Text's words, a Switch's variable, a Column's spacing. Each setting gets a control that fits it:

ControlUsed for
Text boxWords and web addresses. Put a variable in braces to show its value: Hello, {name}! See Text with values.
Number boxSizes, spacing and amounts. Empty means not set, so PadCode or iOS chooses.
SwitchOn or off settings.
MenuA choice from a list, like an alignment.
From and To boxesA range, like a slider's lowest and highest value.
Icon fieldAn SF Symbol. Tap it to open Choose an Icon and search by meaning, like heart or cart.
ColorA color menu and color wheel.
Variable menuThe variable a control changes, like a Switch's on or off. See Variable menus.
Add actions ›Shown for a setting that runs steps, like a Button's Action. It counts the steps (1 action ›, 3 actions ›) and opens the Actions tab.

Some text boxes check what you type and say what's wrong under the box, like a web address that doesn't start with https://. See Text field rules and limits.

A Picker also lists its Options here: type each choice, tap Add option for another, or tap ⊖ to remove one.

#Made of

Many components come in more than one version: a Button with only text, with text and an icon, or with your own views inside (Custom content). The Made of menu, at the top of the section, switches between them.

The Made of menu of a button, with Text + Icon picked.

When you switch:

  • Settings both versions have keep their values. A button's title stays the same when you add an icon.
  • Settings the new version needs get a starting value.
  • Settings the new version doesn't have are removed.
  • Switching a button to Custom content turns its title into a Row holding that text, so you can add an icon or a Loader beside it.
  • Switching a Slider, Gauge or Progress Bar to a version with End labels or a Value label adds a Text for each. Select one to change its words, or put an icon in its place.

Only versions PadCode draws are in the menu, so whichever you pick changes the canvas.

#More settings

The section only has rows for settings PadCode draws. A view can still have a setting the canvas doesn't use or PadCode can't edit, like one set in an older version of PadCode. Those are listed, read-only, under More settings · N at the bottom of the section (N is how many). As the section says: "PadCode can't edit these here yet. They keep the value shown."

Next to most of a component's own settings is a ⚡︎ button, Set from variable. It links the setting to data, so the view changes as the app runs. The ⚡︎ menu offers what's available where you are:

In the menuWhat it links to
App dataOne of your variables, by name.
Screen inputsA value this screen was opened with. Shown when the screen has inputs.
Repeater itemA field of the item being shown, like its title. Shown inside a Repeater whose list has items.
From this actionInside a step only: a name the action gives you, like it in Repeat for Each's Do steps, or error.message in a Try's Catch steps.
SecretsOnly in a Call API step's headers: one of your secrets.
Formula…Opens the formula editor, to work the value out, like price * quantity.
Remove LinkShown once the setting is linked. Unlinks it.
The ⚡︎ menu open on a step's setting: the app's variables under App data, then Formula…

Once a setting is linked, its box turns into an orange chip that shows what it's linked to: a variable's name, a formula after ƒ, or a Repeater field like item.title. The ⚡︎ button turns orange too. To change the link, tap ⚡︎ and pick something else. To unlink, tap ⚡︎ and choose Remove Link.

Text with {braces} isn't a link: it stays a text box you can keep editing.

The formula editor starts with Describe it: say what the formula should work out in your own words and tap Write it, and PadCode's AI writes it for you (Pro; see Writing a formula from words). It shows the formula's result as you type (Right now: …), or what's wrong with it. Below the box are the names you can use (your variables, the screen's inputs, the Repeater item's fields), a card of examples under How formulas work, and every function. Tap any of them to add it to the formula, then tap Done. See Formulas and Formula functions.

#Variable menus

A setting that a control changes, like a Switch's on or off or a Text Field's text, picks a variable instead of a value. Its menu lists your variables and, at the bottom, New Value, which makes a new variable for it and links it. Until one is picked, it says Choose…. The same menus are in the Data tab. See Connecting views to data.

#Colors

Every color setting has two parts: a color menu, and a color wheel button next to it.

The color menu shows the current color and its name, or None. It offers:

  • Asset Colors: your app's own named colors, from the Assets tab. Shown when the app has some. Each has a version for light and one for dark, and switches with the appearance. See Colors.
  • Colors: Primary, Secondary, White, Black, Blue, Indigo, Purple, Pink, Red, Orange, Yellow, Green, Mint, Teal, Cyan, Brown, Gray and Clear. Primary and Secondary are iOS's own text colors, which follow light and dark mode.
  • None: takes the color away. Shown when a color is set.

The color wheel opens iOS's color picker, for any color you like. The setting then shows the color's code, like #5B6CFF.

#Text

Shown for views that show text: Text, Label, Text Field, Password Field, Text Area, Button, Web Link, Switch, Stepper, Picker, Date Picker, Menu, Labeled Value, Share Button, Expandable Section, Box and Section, and any view that already has a font, font weight or text color.

SettingWhat it doesChoices
FontThe text style: Title, Headline, Body and so on. They grow with the size people set for text on their iPad.Default, Large Title, Title, Title2, Title3, Headline, Subheadline, Body, Callout, Caption, Caption2, Footnote, Custom
SizeShown when Font is Custom: the text's size in points. It starts at 17 and stays that size whatever text size people set.Number
TypefaceThe letters' design: System (San Francisco), any font on the iPad, or a font file you add to this app.Opens the Typeface picker
WeightHow thick the letters are, from Light to Black.Default, Ultra Light, Thin, Light, Regular, Medium, Semibold, Bold, Heavy, Black
DesignThe letter shapes: Default, Rounded, Serif or Monospaced (every letter the same width).Default, Rounded, Serif, Monospaced
ColorThe color of the text.Color menu or color wheel
Hint colorText Field and Password Field only. The color of the hint shown in the field while it's empty.Color menu or color wheel
AlignHow the lines of a text line up: to the left, the center or the right.Three buttons: left, center, right
Max linesHow many lines the text can use before it ends with “…”. Empty means no limit.Whole number, or empty for No limit
Letter spacingExtra space between letters, in points. A negative number squeezes them together.Number
CaseShows the text as typed, in UPPERCASE or in lowercase. The text itself doesn't change.As typed, Uppercase, Lowercase
Bold, Italic, Underline, StrikethroughFour buttons under the rows. Each turns its style on or off; a button that's on is highlighted.On or off

The Typeface picker shows every font in its own letters. This app lists System (San Francisco), the fonts you added to this app, and Add font file…; On this iPad lists every font installed on the iPad. Search at the top to find one. A typeface used with a text style like Body keeps growing with people's text size; with Custom, it stays the size you set. See Fonts.

A Text set to the Georgia typeface, with Font set to Body.

#Size & spacing

Shown for every view. For how these fit together, see Laying out views.

SettingWhat it doesChoices
PaddingEmpty space around the view, inside its background. One number for every side, like 16.Number. Shows Mixed when the sides differ.
SidesPadding for one side only: T is the top, L the left, B the bottom, R the right.Four numbers: T, L, B, R
WidthAuto fits the content. Fill takes all the room it can. Fixed sets an exact size in points.Auto, Fill, Fixed (starts at 120; type the number in the box beside it)
HeightAuto fits the content. Fill takes all the room it can. Fixed sets an exact size in points.Auto, Fill, Fixed
AlignShown once Width or Height isn't Auto. Where the content sits when the view is bigger than it, like top left or center.Center (where it starts), Top Left, Top, Top Right, Left, Right, Bottom Left, Bottom, Bottom Right
OffsetNudges the view X points right and Y points down, without moving anything around it. Negative numbers go left and up.Two numbers: X, Y

#Look

Shown for every view. Corners, background, border and Liquid Glass work together: change the corners and the others follow.

SettingWhat it doesChoices
BackgroundA color behind the view. Add Padding so it doesn't hug the content.Color menu or color wheel
CornersRounds the background's corners, in points. 12 is gently rounded; a big number makes a pill. The border and Liquid Glass round with it, and anything inside is cropped to the rounded shape.Number
BorderA line around the view, in the color you pick. Once it has a color, a box beside it sets how thick the line is, in points (1 to start).Color menu or color wheel, then a number
ShadowA soft shadow under the view, so it looks raised. When it's on, a Blur box sets how soft it is (12 to start); a softer shadow also sits lower.Switch, then a number
OpacityHow solid the view is. All the way right is solid; all the way left is invisible.Slider
Liquid GlassApple's glass look: the view blurs and reflects what's behind it.Switch

#Liquid Glass settings

Turning on Liquid Glass gives the view 12 points of padding if it has none (shapes excepted), and picks an outline that suits it: a pill for buttons, text and other small views, the view's own Corners if it has some, or rounded corners for bigger views. On a shape that has a fill color, the color becomes the glass's tint. Four more settings appear under the switch:

SettingWhat it doesChoices
Glass styleRegular blurs what's behind it; Clear stays see-through, for views over photos and video.Regular, Clear
TintColors the glass, like a stained window. Use it for the one most important control.Color menu or color wheel
Reacts to touchThe glass bounces and shimmers when it's pressed, like Apple's own buttons.Switch
ShapeThe glass's outline: a pill, a rectangle with this view's Corners, or a circle.Pill, Rounded, Circle

To let glass views near each other blend together, put them in a Glass Group.

#Control

Shown for buttons, switches, sliders, steppers, pickers, text fields, menus, web links, and other views that come in more than one style.

SettingWhat it doesChoices
StyleThe look iOS gives this control, like a filled or a plain button. Automatic lets iOS choose.Automatic, then the styles this control has. A Button's are Bordered, Bordered Prominent, Borderless, Glass, Glass Prominent and Plain.
AccentThe color of the control's active parts, like a switch when it's on.Color menu or color wheel
SizeHow big the control is: small, regular, large or extra large.Regular (where it starts), Mini, Small, Large, Extra Large

#Shape

Shown for shapes: Rectangle, Rounded Rectangle, Custom Corners, Capsule, Circle, Oval, Concentric Rectangle and Container Shape. See Shapes.

SettingWhat it doesChoices
FillThe shape's color.Color menu or color wheel
OutlineA line around the shape's edge, in this color.Color menu or color wheel
Outline widthShown once the shape has an outline. How thick the outline is, in points.Number (2 to start)

#Show & enable

Shown for every view. It's closed at first, unless the view already has a Show when condition.

SettingWhat it doesChoices
Show whenA condition, like isLoggedIn or count > 0. The view shows only while it's true. Leave it empty to always show it.A formula. Empty shows Always.
DisabledGrays the view out so it doesn't respond to taps.Switch

If the condition has a mistake, like a variable name that doesn't exist, the problem shows under it in orange. On the canvas, a view hidden by its condition is drawn faded, so you can still select it and edit it. See Formulas.

Show & enable and All modifiers, open, for a button.

#All modifiers

The last section, All modifiers · N, lists every modifier on the view, in order (N is how many). It's closed at first. Many of the Style tab's settings are modifiers under the hood, so they show up here too: set a Background in Look and a Background row appears. So do some triggers from the Actions tab, like When Tapped on a Text.

  • Tap a row to open its settings, and again to close them. Under its name, each row sums up its value.
  • ⋯ on a row has Move Up, Move Down and Remove.
  • Add modifier opens Add Modifier: search, or browse by group, and tap one. It goes at the bottom of the list, open, with its settings.
  • Not on canvas yet, in orange on a row, means PadCode doesn't draw that modifier yet. Add Modifier only offers modifiers PadCode draws.

Modifiers apply top to bottom: padding before a background makes the background bigger. Settings you change in the sections above put their modifier where it reads naturally, like padding before a background. If a view has two modifiers of the same kind, the sections above edit the first one. See Modifiers.

#The Actions tab

The Actions tab is where a view gets its steps. Tap the When card at the top to pick the trigger, like Tapped, then tap Add action to add steps under Do, in order. Tap a step to set it up; long-press it to move or remove it. Views that can't start actions say so. See How steps run, Triggers and All actions.

#The Data tab

The Data tab shows the data this view works with:

  • This view: for a control, a variable menu for each variable it changes, like a Switch's Is On. For a Repeater, Repeat for picks the list it repeats over. For a container, Repeat → Repeat for each item… puts its views in a Repeater over one of your lists, or over a New List.
  • Screen inputs: values this screen receives when another screen opens it, read as params.name. Tap Add input to add one and type its starting value; tap ⊖ to remove one.
  • Variables, secrets, APIs & actions opens Data & Logic in the left panel, where your app's variables live.

See Connecting views to data and Variables.

#See also