Skip to main content

General Properties

All components can use the following common properties to add titles, icons, specify where to store settings, etc. Some properties may behave slightly differently per component.

KeyTypeDescriptionCondition
cellstringComponent type
labelstringDisplay labelOptional, localizable
defaultsstringPreferences domain identifier (the name of the settings file/section)
keystringPreference keydefaults != nil
defaultstringDefault value
valueprimitiveCurrent valueOptional
iconstringIcon file nameOptional
readonlybooleanWhether the component is read-onlyOptional
heightnumberRow heightOptional

cell is the component type, such as Button, Switch, Link, etc.

label is the title, usually displayed on the left.

default is the default value. If value is nil, the default will be used to populate value.

icon is the icon shown to the left of label. If set to res/16.png, you are recommended to also provide res/[email protected] and res/[email protected], whose actual pixel sizes should be 2x and 3x respectively.

readonly if true, makes the value read-only. It cannot be modified, cleared, or link to a sub-page.