Summary
Storybook 8.3 is a new version of the best component development tool for building, testing, and documenting UI components. Storybook has partnered with Vitest, the world’s fastest and most configurable test runner, to bring you an unrivaled component testing experience.
The first fruits of this partnership are available to use in the form of @storybook/experimental-addon-test. With minimal configuration, you can now run your stories as Vitest tests.
The result is available in @storybook/experimental-nextjs-vite and you can try it out by installing the package and updating your.storybook.ts. The plugin and the framework are available in the Next.js Vite documentation.
UI states can also be determined by component context. The viewport, theme, background, or internationalization locale are all environmental settings that also affect how a component renders. There has not been a simple, standard way to set these context variables at a story or component level. “Story globals” is a new construct in 8.3 to address this gap.
Storybook 8.3 is available today. Try it in a new project or upgrade an existing project. We have a guide for migrating from older versions.