Skip to main content
‹ Stack
Types

Types

The types of stack.

SectionStackDraftDocumented, not reviewed yet: the API can change.

StackElement​

Class

A stack of screens; the last one shows, and back goes to the one before. The options of screens go on the screens (defineScreen, Screen(…).options()), or on many at once through groups and presentation.

class StackElement implements LayoutElement<Uses>
Defined in src/api/layout/Stack.ts ↗

StackEntry​

Type

A screen of a stack: by name, or Screen(…) with its props and the options of this show.

type StackEntry = string | ScreenElement<any>
MemberTypeDescription
optionsoptions(options: ScreenOptionsInput<object>): ScreenElement<Uses>

The options of this show, over those of the screen's definition.

idid(id: string): ScreenElement<Uses>

The id of the screen, to address it.

Defined in src/api/layout/Stack.ts ↗

PushConfig​

Interface

How push shows a screen.

interface PushConfig
MemberTypeDescription
transitionTransition

How the screen comes and goes: a preset ('fade', 'slideUp', 'scale'…), the zoom of iOS 18 out of a view, or views that move into the screen. The way back is the same in reverse. options.animations go over it.

optionsScreenOptionsInput<object>

Options of the screen for this show, over those of its definition.

Defined in src/api/commands/presentation.ts ↗