Expo UI and Router for iOSExpo SDK 57 and later, iOS only
Modifiers

zIndex

Sets the z-index (display order) of a view.

zIndex(index)

ParameterTypeDescription
indexnumberThe z-index value.

Sets the z-index (display order) of a view.

Returns: ModifierConfig

See: Official SwiftUI documentation.

Works with

You can add zIndex to any view. It changes what you see on 2 of the 39 components.

No visible effect

These components accept it, but you see no change.

ComponentWhy nothing happens
VStackIt changes the order of views that cover each other in the same parent, and VStack does not stack its children.
HStackIt changes the order of views that cover each other in the same parent, and HStack does not stack its children.
LazyVStackIt changes the order of views that cover each other in the same parent, and LazyVStack does not stack its children.
LazyHStackIt changes the order of views that cover each other in the same parent, and LazyHStack does not stack its children.
GroupIt changes the order of views that cover each other in the same parent, and Group does not stack its children.
SpacerIt changes the order of views that cover each other in the same parent, and Spacer does not stack its children.
DividerIt changes the order of views that cover each other in the same parent, and Divider does not stack its children.
ScrollViewIt changes the order of views that cover each other in the same parent, and ScrollView does not stack its children.
ButtonIt changes the order of views that cover each other in the same parent, and Button does not stack its children.
ToggleIt changes the order of views that cover each other in the same parent, and Toggle does not stack its children.
CheckboxIt changes the order of views that cover each other in the same parent, and Checkbox does not stack its children.
SliderIt changes the order of views that cover each other in the same parent, and Slider does not stack its children.
PickerIt changes the order of views that cover each other in the same parent, and Picker does not stack its children.
DatePickerIt changes the order of views that cover each other in the same parent, and DatePicker does not stack its children.
ColorPickerIt changes the order of views that cover each other in the same parent, and ColorPicker does not stack its children.
LinkIt changes the order of views that cover each other in the same parent, and Link does not stack its children.
ControlGroupIt changes the order of views that cover each other in the same parent, and ControlGroup does not stack its children.
MenuIt changes the order of views that cover each other in the same parent, and Menu does not stack its children.
ContextMenuIt changes the order of views that cover each other in the same parent, and ContextMenu does not stack its children.
TextFieldIt changes the order of views that cover each other in the same parent, and TextField does not stack its children.
SecureFieldIt changes the order of views that cover each other in the same parent, and SecureField does not stack its children.
TextIt changes the order of views that cover each other in the same parent, and Text does not stack its children.
LabelIt changes the order of views that cover each other in the same parent, and Label does not stack its children.
ImageIt changes the order of views that cover each other in the same parent, and Image does not stack its children.
ListIt changes the order of views that cover each other in the same parent, and List does not stack its children.
FormIt changes the order of views that cover each other in the same parent, and Form does not stack its children.
SectionIt changes the order of views that cover each other in the same parent, and Section does not stack its children.
DisclosureGroupIt changes the order of views that cover each other in the same parent, and DisclosureGroup does not stack its children.
SwipeActionsIt changes the order of views that cover each other in the same parent, and SwipeActions does not stack its children.
BottomSheetIt changes the order of views that cover each other in the same parent, and BottomSheet does not stack its children.
AlertIt changes the order of views that cover each other in the same parent, and Alert does not stack its children.
ConfirmationDialogIt changes the order of views that cover each other in the same parent, and ConfirmationDialog does not stack its children.
PopoverIt changes the order of views that cover each other in the same parent, and Popover does not stack its children.
ProgressViewIt changes the order of views that cover each other in the same parent, and ProgressView does not stack its children.
GaugeIt changes the order of views that cover each other in the same parent, and Gauge does not stack its children.
TabViewIt changes the order of views that cover each other in the same parent, and TabView does not stack its children.
AccessoryWidgetBackgroundIt changes the order of views that cover each other in the same parent, and AccessoryWidgetBackground does not stack its children.

Sources

The original Expo docs for this page:

On this page