
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
storybook-solidjs-vite
Advanced tools
Community supported Storybook framework adapter for SolidJS, using Vite as the bundler.
The fastest way to start using Storybook with SolidJS:
npx create-solid-storybook <folder-name>
Replace <folder-name> with your desired project directory name. This will generate a SolidJS project pre-configured with Storybook 9 and all essential addons.
Then run:
cd <folder-name>
npm run storybook
Open the provided URL in your browser to view your Storybook instance.
You can set everything up manually. To do this:
.storybook/**vitest.config.tsnpm install storybook storybook-solidjs-vite @chromatic-com/storybook @storybook/addon-onboarding @storybook/addon-docs @storybook/addon-a11y @storybook/addon-links @storybook/addon-vitest @vitest/coverage-v8 playwright vitest @vitest/browser
package.json:"scripts": {
"build": "storybook build",
"storybook": "storybook dev -p 6006"
}
Create your stories in stories/ (or use examples from the template's stories folder)
Start Storybook:
npm run storybook
src/**/*.stories.tsx or src/**/*.stories.js.createDecorator and createJSXDecorator helpersStorybook re-executes decorator code and story code on every change (e.g., when args or globals change). However, SolidJS uses fine-grained reactivity, which means components run once and effects/tracking scopes re-run when dependencies change. SolidJS doesn't require re-executing the component function itself on every update.
This mismatch causes issues: when decorators that return JSX are re-executed, they create duplicate DOM elements, leading to double-rendering. The createJSXDecorator helper marks decorators so they're only executed once, preventing this issue.
Use createDecorator for decorators that don't return JSX (e.g., they only call Story()). This ensures type safety only.
Use createJSXDecorator for decorators that return JSX elements. This ensures type safety and prevents double-rendering by marking them to be executed only once on initial render.
Example: Decorator that returns JSX
import { createJSXDecorator } from 'storybook-solidjs-vite';
export const solidDecorator = createJSXDecorator((Story, context) => {
return (
<main>
<Story />
</main>
);
});
Example: Decorator that doesn't return JSX
import { createDecorator } from 'storybook-solidjs-vite';
export const regularDecorator = createDecorator((Story) => {
return Story();
});
You can also manually mark decorators as JSX-returning by setting the flag directly:
import { IS_SOLID_JSX_FLAG } from 'storybook-solidjs-vite';
export const myDecorator = (Story, context) => {
return <div><Story /></div>;
};
myDecorator[IS_SOLID_JSX_FLAG] = true;
Migrating from version 9 to 10? Check out our Migration Guide for step-by-step instructions and breaking changes.
Contributions, issues and feature requests are welcome! Feel free to open an issue or submit a PR.
Maintained with ❤️ by @kachurun
MIT
FAQs
SolidJS integration with Storybook
The npm package storybook-solidjs-vite receives a total of 9,245 weekly downloads. As such, storybook-solidjs-vite popularity was classified as popular.
We found that storybook-solidjs-vite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.