React

Upgrade Guides

Guides you through checking compatibility and safely upgrading when updating Crispy package versions.

This guide walks you through upgrading to Crispy React 2. For the full set of changes, including new features, see the Changelog.

This guide is written for upgrading from 1.2.x to 2. If you're on a version lower than 1.2, follow the v1 and below upgrade guide first, then come back to this document.

Semantic versioning is followed starting from 2.0.0

In 1.x, breaking changes could be introduced in minor versions, but starting from 2.0.0, each package follows semantic versioning and only introduces breaking changes in major versions. The major version is updated to 2 to mark the starting point of semantic versioning compliance.

Not all packages always move to the same major version together. For example, if a breaking change applies only to the React package with no CSS changes, each package's version increments independently. Docs and guides communicate using the React package's version (e.g. "Crispy React 2").

Paths under @seed-design/css/vars/component/*, other than @seed-design/css/vars/component/typography, are not covered by SemVer guarantees. If the rootage component spec changes, names or structure may change even in a minor or patch release, so we recommend not depending on them directly in app or library code.


Upgrade packages

Upgrade the @seed-design/* packages your project uses to at least the versions below.

PackageMinimum versionNotes
@seed-design/css2.1.0
@seed-design/react2.0.0
@seed-design/stackflow2.0.0
@seed-design/tailwind4-theme2.1.0
@seed-design/tailwind3-plugin2.1.0
@seed-design/vite-plugin2.0.0No changes; identical to 1.1.1. The version was updated to match the major version bump of the @seed-design/css peer.
@seed-design/webpack-plugin2.0.0No changes; identical to 1.1.0. The version was updated to match the major version bump of the @seed-design/css peer.
@seed-design/rsbuild-plugin2.0.0No changes; identical to 1.2.1. The version was updated to match the major version bump of the @seed-design/css peer.

You only need to upgrade the packages currently used in your project. There's no need to newly install packages you don't use.

npm install @seed-design/react@latest @seed-design/css@latest @seed-design/stackflow@latest

Code changes

Items with design changes

These are items where the on-screen result may change, so a design decision might be needed.

1. Removed gradient tokens $gradient.fade-layer-*

Judgment call required

$gradient.fade-layer-floating and $gradient.fade-layer-default have been removed. If you want a natural fade on a scroll area, use the Scroll Fog component instead.

If you're hardcoding Tailwind utility classes or CSS variables, this change won't be caught as an error. Please search for usages directly.

2. Removed Chip Tabs variant="brandSolid"

Discoverable via errors

Please use variant="neutralSolid".

A type error like the following may occur in a branch that existed solely for a deprecation warning in the seed-design/ui/chip-tabs.tsx snippet.

This comparison appears to be unintentional because the types
'"neutralSolid" | "neutralOutline" | undefined' and '"brandSolid"' have no overlap. ts(2367)

Please re-fetch the snippet or remove that branch.

npx @seed-design/cli@latest add --on-diff backup ui:chip-tabs

3. Removed App Bar divider option

Discoverable via errors

The bottom divider on the App Bar is no longer displayed. It was removed based on the design decision that area separation is sufficient without a divider or shadow.

Note: $color.bg.layer-fill color token

This token was originally scheduled for removal in Crispy React 2, but due to the lack of a replacement token, it's now scheduled for removal in 3 instead. It was actually removed in @seed-design/css, tailwind3-plugin, and tailwind4-theme 2.0.0, but was added back in 2.1.0.

Items requiring code changes

1. Buttons inside Snackbar now always close the snackbar

Snippet update recommended

Pressing a button inside a Snackbar now always closes the snackbar. This behavior is now built in by default to SeedSnackbar.ActionButton in @seed-design/react.

The shouldCloseOnAction-related code in the seed-design/ui/snackbar.tsx snippet is now redundant. There's no issue with the behavior, but we recommend re-fetching the snippet to remove the redundant logic. The default value of the existing shouldCloseOnAction was also true.

npx @seed-design/cli@latest add --on-diff backup ui:snackbar

2. Layout component props converted to a discriminated union

Discoverable via errors

With the addition of margin support to layout components, the types have been constrained to a discriminated union so that margin and bleed can't be used at the same time.

Because of this, an interface that directly extends BoxProps, FlexProps, VStackProps, etc. may need to be converted to a type.

interface MyBoxProps extends BoxProps {} 
type MyBoxProps = BoxProps & {}; 

3. Bottom Sheet option cleanup

Discoverable via errors
  • Removed noBodyStyles and preventScrollRestoration from BottomSheetRoot: the new scroll lock implementation now behaves like each option's default value (noBodyStyles: true, preventScrollRestoration: false).
  • Removed direction from BottomSheetRoot: Bottom Sheet now always opens only from the bottom.
  • Removed forceMount from BottomSheetBackdrop
    • Can be replaced with lazyMount / unmountOnExit on DrawerRoot.
  • Removed onPointerDownOutside, onFocusOutside, onInteractOutside, onEscapeKeyDown, onOpenAutoFocus, onCloseAutoFocus, and forceMount from BottomSheetContent
    • Can be replaced with the second argument, details, of onOpenChange on DrawerRoot.

4. Select Box Checkmark class name and import path

Changed the selectBoxCheckmark class name and import path to kebab-case.

If you're using the selector in a custom stylesheet

Change the class to kebab-case.

Judgment call required
.seed-selectBoxCheckmark__root {
  /* ... */
}
.seed-selectBoxCheckmark__icon {
  /* ... */
}
.seed-select-box-checkmark__root {
  /* ... */
}
.seed-select-box-checkmark__icon {
  /* ... */
}

If you're importing the recipe in a custom component

Change the path.

Discoverable via errors
import { selectBoxCheckmark } from "@seed-design/css/recipes/selectBoxCheckmark"; 
import { selectBoxCheckmark } from "@seed-design/css/recipes/select-box-checkmark"; 

5. Bug fixes and improvements for overlay components

Judgment call required

Fixed bugs related to Alert Dialog, Bottom Sheet, and Menu Sheet.

  • All code that blocked clicks via pointer-events has been removed. If you had a workaround overriding this, you can remove it as well.
  • When a nested overlay closes while multiple overlays are stacked, onOpenChange now provides "cascadeDismiss" as the reason.
  • When a Bottom Sheet opens via a trigger click, onOpenChange now provides "trigger" as the reason.
  • Fixed an issue on iOS where swiping the sheet via a button inside the Bottom Sheet could trigger an unintended click.
  • Fixed focus so that when AppScreen or Drawer opens, focus moves into the component and stays trapped within it.

The @radix-ui/react-dialog dependency and patch, which didn't work well with the Stackflow environment, have been removed from @seed-design/react. If you installed this package in a pnpm environment solely for Crispy React, you can remove it.

pnpm why @radix-ui/react-dialog
pnpm remove @radix-ui/react-dialog

6. Removed some APIs that have replacements

Discoverable via errors

Removed Image Frame rounded

Please use borderRadius="r2". The style is identical.

<ImageFrame rounded /> 
<ImageFrame borderRadius="r2" /> 

Removed Switch size="small" | "medium"

Please use size="16" and size="32" respectively. The styles are identical.

<Switch size="small" />  
<Switch size="16" />     
<Switch size="medium" /> 
<Switch size="32" />     

Removed Checkbox weight="default" | "stronger"

Please use weight="regular" and weight="bold" respectively. The styles are identical.

<Checkbox weight="default" />  
<Checkbox weight="regular" />  
<Checkbox weight="stronger" /> 
<Checkbox weight="bold" />     

Removed camelCase values from layout component props

camelCase values have been removed from justifyContent, alignItems, flexDirection, display, etc. on layout components such as Box, Flex, VStack, and HStack. Please use kebab-case values. The styles are identical.

<Box justifyContent="spaceBetween" />  
<Box justifyContent="space-between" /> 

7. Menu Sheet deprecation notice

The existing Menu Sheet APIs continue to work in Crispy React 2 but are now deprecated. If you're using Menu Sheet for the first time, please use the Swipeable Menu Sheet component instead.

Table of contents