Frame
<Frame>
is a UI component used to display <Page>
elements.
Every app needs at least a single <Frame>
element, usually set as the root element.
Multiple Frames
If you need to create multiple frames, you can do so by wrapping them in a Layout, for example, if you want to have 2 frames side-by-side
<gridLayout columns={'* *'} rows={[]}>
<frame col={0} />
<frame col={1} />
</gridLayout>
<gridLayout columns="*, *">
<frame col="0" />
<frame col="1" />
</gridLayout>
<GridLayout columns="*, *">
<frame col="0" />
<frame col="1" />
</GridLayout>
Example: A frame with a default page
<frame>
<page>
<actionBar title="Default Page Title" />
<gridLayout>
<label text="Default Page Content" />
</gridLayout>
</page>
</frame>
<frame>
<page>
<actionBar title="Default Page Title" />
<gridLayout>
<label text="Default Page Content" />
</gridLayout>
</page>
</frame>
<frame>
<Page>
<ActionBar title="Default Page Title" />
<GridLayout>
<label text="Default Page Content" />
</GridLayout>
</Page>
</frame>
Static Props
Name | Type | Description |
---|---|---|
|
|
Gets or sets if navigation transitions should be animated globally. |
|
|
Gets or sets the default NavigationTransition for all frames across the app. |
Props
Name | Type | Description |
---|---|---|
|
|
Gets the back stack of this instance. |
|
|
Gets the Page instance the Frame is currently navigated to. |
|
|
Gets the NavigationEntry instance the Frame is currently navigated to. |
|
|
Gets or sets if navigation transitions should be animated. |
|
|
Gets or sets the default navigation transition for this frame. |
|
|
Used to control the visibility of the Navigation Bar in iOS and the Action Bar in Android. |
Static Methods
Name | Return Type | Description |
---|---|---|
|
|
Gets a frame by id. |
|
|
Gets the topmost frame in the frames stack. An application will typically have one frame instance. Multiple frames handle nested (hierarchical) navigation scenarios. |
|
Navigates back using the navigation hierarchy (if any). Updates the Frame stack as needed. This method will start from the topmost Frame and will recursively search for an instance that has the canGoBack operation available. |
Instance Methods
Name | Type | Description |
---|---|---|
|
Navigates to the previous entry (if any) in the back stack. |
|
|
|
Checks whether the goBack operation is available. |
|
Navigates to a Page instance as described by the module name.
This method will require the module and will check for a Page property in the exports of the module.
+ |
|
|
Creates a new Page instance using the provided callback and navigates to that Page.
+ |
|
|
Creates a new Page instance using the provided callback and navigates to that Page.
+ Since there are a couple of ways to specify a Page instance through an entry, there is a resolution priority: + |
Other function(s)
Name | Return Type | Description |
---|---|---|
|
|
Sets the extended |
NavigationEntry interface
Name | Return Type | Description |
---|---|---|
|
|
The name of the module containing the View instance to load. |
|
|
A function used to create the View instance. |
|
|
An object passed to the onNavigatedTo callback of the Page. Typically, this is used to pass some data among pages. |
|
|
An object to become the binding context of the page navigating to. Optional. |
|
|
True to navigate to the new Page using animated transitions, false otherwise. |
|
|
Specifies an optional navigation transition for all platforms. If not specified, the default platform transition will be used. |
|
|
Specifies an optional navigation transition for Android. If not specified, the default platform transition will be used. |
|
|
Specifies an optional navigation transition for iOS. If not specified, the default platform transition will be used. |
|
|
True to record the navigation in the backstack, false otherwise. If the parameter is set to false then the Page will be displayed but once navigated from it will not be able to be navigated back to. |
|
|
True to clear the navigation history, false otherwise. Very useful when navigating away from login pages. |