This example shows a default set up of Storybook using storybook-addon-next. Included in this example are stories that demonstrate the ability to use Next.js and PrimeReact features in Storybook.
As of v6.0, Storybook has built-in TypeScript support, so no configuration is needed. If you want to customize the default configuration, refer to the TypeScript docs.
-
Create the application.
Use degit to get this template.
# Clone the template npx degit gzamaury/nextjs-templates my-new-project
-
Install the dependencies.
Navigate into your new site’s directory and install the necessary dependencies.
# Navigate to the directory cd my-new-project/ # Install the dependencies npm install
-
Open the source code and start editing!
Open the
my-new-project
directory in your code editor of choice and building your first component! -
Browse your stories!
Run
npm run storybook
to see your component's stories athttp://localhost:6006