Skip to content
React Spring Bottom Sheet
PrimitivesNIPE Open Source

migration / react-spring-bottom-sheet

Migrate from react-spring-bottom-sheet

This is an independently maintained continuation for React 19. Move deliberately from react-spring-bottom-sheet to @nipe-solutions/react-spring-bottom-sheet with a documented API and styling path.

npm install @nipe-solutions/react-spring-bottom-sheet

Choose your path

Evaluate version 5

Choose the React 19 package when its explicit controlled state, composable parts, and styling contracts fit your next release.

Stay with the original for now

Keep the original package until a migration is practical. The complete guide records the mapping so you can plan the change without treating it as a drop-in upgrade.

Controlled state before and after

The migration changes a monolithic component into explicit composition while keeping application state under your control.

Original package

Before.tsx
import { useState } from 'react'
import { BottomSheet } from 'react-spring-bottom-sheet'

export function Details() {
  const [open, setOpen] = useState(false)

  return (
    <BottomSheet open={open} onDismiss={() => setOpen(false)}>
      <h2>Details</h2>
    </BottomSheet>
  )
}

React 19 continuation

After.tsx
import { useState } from 'react'
import { Sheet } from '@nipe-solutions/react-spring-bottom-sheet'

export function Details() {
  const [open, setOpen] = useState(false)

  return (
    <Sheet.Root open={open} onOpenChange={setOpen}>
      <Sheet.Portal>
        <Sheet.Backdrop />
        <Sheet.Viewport>
          <Sheet.Content>
            <Sheet.Title>Details</Sheet.Title>
            <Sheet.Close>Close</Sheet.Close>
          </Sheet.Content>
        </Sheet.Viewport>
      </Sheet.Portal>
    </Sheet.Root>
  )
}

API and styling mapping

Version 4 to version 5 migration mapping
Original APIVersion 5 path
openKeep open on Sheet.Root or BottomSheet.
blockingReplace with modal.
onDismissUse onOpenChange and update controlled state when it receives false.
snapPointsProvide named { id, value } snap points.
defaultSnapUse defaultSnapPoint with a snap-point id.
headerCompose header content before the scroll region inside Sheet.Content.
footerCompose footer content after the scroll region inside Sheet.Content.
BottomSheetRefRemove it; control active snap state with props and callbacks.
expandOnContentDragRemove it; gesture ownership now follows scroll boundaries.
stylesheet importsReplace /style.css or /dist/style.css with /styles.css; use /core.css for a full restyle.

See the complete migration guide for callback, CSS selector, and import detail.

Requirements

Version 5 requires React 19 and is verified in current Chromium, Firefox, and WebKit browsers.

Continue the evaluation