Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@storybook/addon-queryparams

Latest version: v12.0.0--canary.29.46110783228.0

Overview

Last scanned
28 Nov 2026
Published
28 Nov 2026
npm package Publisher: domyen, huang-julien, jreinhold, kasperpeulen, kylegach, ndelangen, shilman, storybook-bot, tmeasday, valentinpalkovic, vanessayuenn, winkervsbecks
12 Stars
9 Forks
14 Versions
313.6K Downloads
TypeScript Repo language

Scan summary

@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.

  • Releases: 14 versions; the latest 3 were published on 28 Nov 2026.
  • Findings: No rules fired in version 12.0.0--canary.29.46110783228.0.
  • Downloads: 313,649 downloads.

Versions

14 versions published
Versions and the rules that fired in each
VersionPublishedStatus
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

No rules fired in 12.0.0--canary.29.46110783228.0

Findings

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.

README

The publisher’s own README, as collected from the registry.

@storybook/addon-queryparams

[!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.

Getting started

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.

Manual install

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
});

Usage

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.

Clearing query parameters

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] undefined values are treated like null, but prefer null for overrides: Storybook drops undefined values when merging parameters, so they cannot override a value defined at another level.

Reserved query parameters

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.

Usage with the Vitest addon

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.

Credits

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

OX Radar and Response Center

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.

Where it’s listed

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).

  • npm @storybook/addon-queryparams

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229