# Getting Started URL: /react/stackflow/getting-started Source: https://github.com/daangn/seed-design/blob/dev/docs/content/react/stackflow/getting-started.mdx Guide to configuring Stackflow plugin for using Crispy AppScreen. ## Overview To use the [`AppScreen`](/react/stackflow/app-screen) component of Crispy React, add `seedPlugin` to the [Stackflow](https://stackflow.so/) plugin. Learn more about the AppScreen component. `seedPlugin` provides the following features: - **Theme Context Provision**: Automatically passes `theme` to all `AppScreen` components. - **Global Interaction Management**: Manages Swipe Back gesture and global transition state. ## Installation `seedPlugin` is included in the `@seed-design/stackflow` package. - npm: npm install @seed-design/stackflow - pnpm: pnpm add @seed-design/stackflow - yarn: yarn add @seed-design/stackflow - bun: bun add @seed-design/stackflow ## Usage Add `seedPlugin` to the `plugins` array when configuring Stackflow. ```tsx import { stackflow } from "@stackflow/react/future"; import { seedPlugin } from "@seed-design/stackflow"; export const { Stack, actions } = stackflow({ plugins: [ seedPlugin({ theme: "cupertino" }), // ... ], // ... }); ``` ### Options ### 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. ```tsx title="stackflow.ts" import { stackflow } from "@stackflow/react/future"; import { seedPlugin } from "@seed-design/stackflow"; export const { Stack, actions } = stackflow({ plugins: [ seedPlugin(({ initialContext }) => ({ theme: initialContext?.theme ?? "cupertino", })), // ... ], // ... }); ``` Pass the theme with `initialContext` when rendering ``. ```tsx title="App.tsx" import type { SeedPluginOptions } from "@seed-design/stackflow"; ; ``` ## 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](https://stackflow.so/api-references/plugins/plugin-basic-ui), `theme` can be either `"android"` or `"cupertino"`. ```tsx // The theme provided as an option to seedPlugin is applied by default to `AppScreen`. // You can override it through the `theme` prop of `AppScreen`. {/* ... */} {/* ... */} ``` ### 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 `AppScreen` position is updated based on the swiping amount.