Scan your whole stack
From OX Research Newsroom
Are you using @storybook/addon-queryparams?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v12.0.0--canary.29.46110783228.0
@storybook/addon-queryparams was last scanned on 28 Nov 2026 at version 12.0.0--canary.29.46110783228.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 12.0.0--canary.29.46110783228.0 LATEST | 28 Nov 2026 | No rules fired |
| 11.0.1 | 28 Nov 2026 | No rules fired |
| 11.0.1--canary.33.46105958877.0 | 28 Nov 2026 | No rules fired |
| 12.0.0--canary.29.43909567021.0 | 16 Nov 2026 | Not shown |
| 11.0.0 | 16 Nov 2026 | Not shown |
Findings for v12.0.0--canary.29.46110783228.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 12.0.0--canary.29.46110783228.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
[!NOTE] This addon is now community-maintained. It was previously maintained by the Storybook team.
This Storybook addon can be helpful if your components need special query parameters to work the way you want them to. It allows you to mock query params per story so that you can easily reproduce different states of your component.
Run the following command to install the addon and register it in your Storybook configuration:
npx storybook add @storybook/addon-queryparams
Stories written with CSF 4, the default story format since Storybook 11, will now get a type-checked query parameter.
First install the dependency:
npm i -D @storybook/addon-queryparams
Then, register addonQueryParams() so that TypeScript knows about the query parameter:
// .storybook/preview.ts
// Replace your-framework with the framework you are using (e.g., react-vite, nextjs-vite)
import { definePreview } from '@storybook/your-framework';
import addonDocs from '@storybook/addon-docs';
import addonQueryParams from '@storybook/addon-queryparams';
export default definePreview({
// ...rest of preview
addons: [addonDocs(), addonQueryParams()], // 👈 register the addon here
});
In your story, define the query parameters you want to mock via the query special parameter:
// src/stories/Button.stories.tsx
import preview from '#.storybook/preview';
import React from 'react';
import { Button } from '../Button';
const meta = preview.meta({
component: Button,
parameters: {
query: {
// example of mocking ?greeting="Hello world!"
greeting: 'Hello world!',
},
},
});
export const WithMockedSearch = meta.story({
render: () => {
const urlParams = new URLSearchParams(document.location.search);
const mockedParam = urlParams.get('greeting');
return <div>Mocked value: {mockedParam}</div>;
},
});
The query parameter accepts either an object or a query string ('greeting=Hello world!&page=2'). Object values may be strings, numbers or booleans, which are stringified into the URL.
The query parameters are applied before the story renders, and the URL is restored to its previous state when you navigate away from the story, so parameters never leak from one story to the next.
Set a parameter to null to remove it from the URL instead of setting it. This is useful to clear a parameter that is defined at the meta or preview level:
export const WithoutGreeting = meta.story({
parameters: {
query: {
// removes ?greeting even if it is set at the meta level
greeting: null,
},
},
});
[!TIP]
undefinedvalues are treated likenull, but prefernullfor overrides: Storybook dropsundefinedvalues when merging parameters, so they cannot override a value defined at another level.
Storybook uses the path, id, viewMode, args, globals, refId, instrument, navigator and __SPECIAL_TEST_PARAMETER__ query parameters internally in the preview URL. To avoid breaking story selection and args syncing, the addon ignores these keys and logs a warning if your stories try to set or clear them. All other query parameters are left exactly as they are, byte for byte.
Query parameters are applied through a beforeEach hook, which also runs when stories are executed as portable stories, e.g. with the Vitest addon. Play functions can therefore rely on the mocked query parameters in both Storybook and Vitest runs.
While this addon was part of the Storybook monorepo, it received commits from the following authors:
Andrew Lisowski, Brody McKee, Clément DUNGLER, Filipp Riabchun, Gaëtan Maisse, Gert Hengeveld, Jon Palmer, Lynn Chyi, Michael Shilman, Norbert de Langen, Paul Rosania, Renovate Bot, Tom Coleman, Varun Vachhar, Yann Braga
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.