Getting Started
Guide to configuring Stackflow plugin for using Crispy AppScreen.
Overview
To use the AppScreen component of Crispy React, add seedPlugin to the Stackflow plugin.
App Screen
Learn more about the AppScreen component.
seedPlugin provides the following features:
- Theme Context Provision: Automatically passes
themeto allAppScreencomponents. - Global Interaction Management: Manages Swipe Back gesture and global transition state.
Installation
seedPlugin is included in the @seed-design/stackflow package.
Usage
Add seedPlugin to the plugins array when configuring Stackflow.
Options
Prop
Type
theme"android" | "cupertino"Dynamic Options
When the theme needs to be determined dynamically in SSR environments or similar cases, you can set seedPlugin options through initialContext provided to Stack.
Pass the theme with initialContext when rendering <Stack>.
What It Provides
Theme Context
seedPlugin passes the theme configured through the theme option to all AppScreen components. All AppScreen uses this theme by default.
Like @stackflow/plugin-basic-ui, theme can be either "android" or "cupertino".
Swipe Back Gesture
When using theme="cupertino", iOS-style Swipe Back gesture is activated.
- Swiping from the left edge of the screen to the right moves to the previous Activity.
- The
AppScreenposition is updated based on the swiping amount.