Contributing
If you find a bug or have a feature request please open an issue. If you want to contribute code please open a pull request.
Running tests
Section titled “Running tests”Install dependencies and browser binaries once:
npm cinpx playwright install chromium webkitRun all tests with npm test, Node unit and SSR tests with npm run test:unit, or browser interaction tests with npm run test:browser. Run only the server-rendering checks with npm run test:ssr; they use React’s renderToString in Node and require no browser or framework app.
Browser tests use Vitest Browser Mode with real Motion animations in Chromium and WebKit. They run independently of the docs server. On Linux, install browser system dependencies with npx playwright install --with-deps chromium webkit.
For interactive debugging, run npm run test:browser -- --watch --browser.headless=false. Failure screenshots are saved under .vitest/attachments/ and uploaded by CI.
Running the docs and examples
Section titled “Running the docs and examples”From the repository root:
npm ci --prefix docsnpm run devOpen http://localhost:4321/react-modal-sheet/. Documentation and all 16 examples run in the same Astro project. Changes to the library’s src/ and example components in docs/src/examples/ update the previews automatically; a library build or package-linking step is unnecessary.
Use npm run docs:check to check documentation and example types, and npm run docs:build to build the static site. Use npm run build when you need the library’s distributable files.
