Skip to content
Preview

ViewStack

viewrequired
string
Which view shows: a new value is a move to another view.
depth
number
Default: 0
How deep the view is (a list 0, the item it opened 1). Deeper than the last is a push: the new view comes in from the end as the old one sets back. Shallower is a pop, the mirror. The same depth is a swap: the new view rises in.
rootStyle
RootStyle<ViewStackKnobs>
Typed StyleX override: where the stack sits (it fills a flex or grid parent like a block) and its surface.
children
ReactNode
The view.

Rest props go to HTMLAttributes<HTMLDivElement>.

State machine

PreviewOpen a file from the list.