Show HN: Vite plugin for React previews (minimal config, Storybook alternative)

by diegof79on 8/6/2024, 2:43 PMwith 0 comments

While I have used StoryBook since its early days, in my last projects, I wanted something simple that only provides a playground. I created this plugin after implementing a few quick-and-dirty playgrounds using Vite glob imports.

The plugin does not replace StoryBook, as it only provides a quick playground and doesn't plan to have any of its features. However, it's a fast-compatible alternative if you use Vite and want to play with your components visually.

It's intentionally lightweight and extensible. While I prefer using separate files with the ".preview.tsx" extension, you can opt for ".stories.tsx" to use it alongside Storybook. Alternatively, you can customize it to use a "preview" export (similar to SwiftUI) with minimal programming effort.

0