Skip to main content

View Properties

A list of all SwiftUI View properties that can be set for a view.

Property NameTypeDescription
fontFontStyleSets the style of the font used for text, such as italic or bold.
fontWeightFontWeightDefines the thickness of the font characters.
foregroundColorstringSpecifies the color of the text or foreground elements using a color code or name (e.g., #FFFFFF).
borderColorstringDefines the color of the border around a UI element using a color code or name.
borderTypestringDetermines the style of the border.
borderWidthnumberSpecifies the thickness of the border around a UI element.
paddingnumberSets the space inside the element between the content and the border.
spacingnumberDefines the space between different UI elements.
widthnumberSpecifies the width of a UI element.
heightnumberSpecifies the height of an UI element.
minLengthnumberSets the minimum length for an UI element.
backgroundColorstringDefines the background color of a UI element using a hex code.
tintstringDefines the tint color of a UI element using a hex code. In IOS 15 and older it uses accentColor
overlayColorstringSpecifies the color of an overlay that might appear over a UI element using a color code or name.
horizontalAlignmentHorizontalAlignmentDetermines how content is aligned horizontally within a UI element.
verticalAlignmentVerticalAlignmentDetermines how content is aligned vertically within a UI element.
axisScrollViewAxisSpecifies the axis along which a scroll view can scroll (e.g., horizontal, vertical).
showsIndicatorsbooleanIndicates whether scroll indicators (like scrollbars) should be displayed.
titleDisplayModeTitleDisplayModeControls how the title is displayed in the UI, such as always visible or only when scrolling.
navigationBarHiddenbooleanDetermines whether the navigation bar is hidden or visible.
ignoreSafeAreabooleanIf true, the UI element can extend into the safe area of the screen, ignoring system insets.
listStyleListStyleDefines the appearance of lists (e.g., plain, grouped, inset).
hoverEffectHoverEffectSpecifies the visual effect when a user hovers over a UI element.
toolbarPlacementToolbarPlacementDetermines where the toolbar is placed in the UI.
accessibilityHintstringIOS Accessibility Hint
accessibilityLabelstringIOS Accessibility Label
accessibilityIdentifierstringIOS Accessibility Identifer
accessibilityValuestringIOS Accessibility Value
enableMarkdownbooleanEnables Markdown interpretation for the Text.

The types mentioned here refer to the types defined in Typescript for this package.