7.0.1 • Published 9 months ago

@storybook/addon-queryparams v7.0.1

Weekly downloads
9,116
License
MIT
Repository
github
Last release
9 months ago

@storybook/addon-queryparams

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

First, install the addon.

$ npx storybook@latest add @storybook/addon-queryparams

In your story, define the query parameters you want to mock via the query special parameter:

import React from "react";
import { Button } from "../Button";

export default {
  component: Button,
  parameters: {
    query: {
      // example of mocking ?greeting="Hello world!"
      greeting: "Hello world!",
    },
  },
};

export const WithMockedSearch = {
  render: () => {
    const urlParams = new URLSearchParams(document.location.search);
    const mockedParam = urlParams.get("greeting");
    return <div>Mocked value: {mockedParam}</div>;
  }
}

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

7.0.1

9 months ago

6.3.0-alpha.21

4 years ago

6.3.0-alpha.20

4 years ago

6.3.0-alpha.19

4 years ago

6.3.0-alpha.18

4 years ago

6.3.0-alpha.17

4 years ago

6.3.0-alpha.16

4 years ago

6.3.0-alpha.15

4 years ago

6.3.0-alpha.14

4 years ago

6.2.9

4 years ago

6.3.0-alpha.13

4 years ago

6.3.0-alpha.12

4 years ago

6.3.0-alpha.11

4 years ago

6.3.0-alpha.10

4 years ago

6.3.0-alpha.9

4 years ago

6.3.0-alpha.8

4 years ago

6.2.8

4 years ago

6.3.0-alpha.7

4 years ago

6.3.0-alpha.6

4 years ago

6.3.0-alpha.5

4 years ago

6.3.0-alpha.4

4 years ago

6.3.0-alpha.2

4 years ago

6.3.0-alpha.3

4 years ago

6.2.7

4 years ago

6.2.6

4 years ago

6.3.0-alpha.0

4 years ago

6.3.0-alpha.1

4 years ago

6.2.5

4 years ago

6.2.4

4 years ago

6.2.3

4 years ago

6.2.2

4 years ago

6.2.0-rc.13

4 years ago

6.2.1

4 years ago

6.2.0

4 years ago

6.2.0-rc.12

4 years ago

6.2.0-rc.11

4 years ago

6.2.0-rc.10

4 years ago

6.2.0-rc.9

4 years ago

6.2.0-rc.8

4 years ago

6.2.0-rc.7

4 years ago

6.2.0-rc.6

4 years ago

6.2.0-rc.4

4 years ago

6.2.0-rc.5

4 years ago

6.2.0-rc.3

4 years ago

6.2.0-rc.2

4 years ago

6.2.0-rc.1

4 years ago

6.2.0-rc.0

4 years ago

6.2.0-beta.15

4 years ago

6.2.0-beta.14

4 years ago

6.2.0-beta.13

4 years ago

6.2.0-beta.12

4 years ago

6.2.0-beta.11

4 years ago

6.2.0-beta.10

4 years ago

6.2.0-beta.9

4 years ago

6.1.21

4 years ago

6.2.0-beta.8

4 years ago

6.2.0-beta.6

4 years ago

6.2.0-beta.5

4 years ago

6.2.0-beta.4

4 years ago

6.2.0-beta.3

4 years ago

6.1.20

4 years ago

6.2.0-beta.2

4 years ago

6.2.0-alpha.33

4 years ago

6.2.0-alpha.35

4 years ago

6.2.0-alpha.34

4 years ago

6.1.19

4 years ago

6.2.0-beta.0

4 years ago

6.2.0-beta.1

4 years ago

6.2.0-alpha.31

4 years ago

6.2.0-alpha.30

4 years ago

6.2.0-alpha.32

4 years ago

6.2.0-alpha.29

4 years ago

6.2.0-alpha.28

4 years ago

6.2.0-alpha.27

4 years ago

6.1.18

4 years ago

6.2.0-alpha.26

4 years ago

6.2.0-alpha.25

4 years ago

6.2.0-alpha.24

4 years ago

6.2.0-alpha.23

4 years ago

6.2.0-alpha.22

4 years ago

6.1.17

4 years ago

6.2.0-alpha.21

4 years ago

6.1.16

4 years ago

6.2.0-alpha.20

4 years ago

6.2.0-alpha.19

4 years ago

6.1.15

4 years ago

6.2.0-alpha.18

4 years ago

6.2.0-alpha.17

4 years ago

6.2.0-alpha.16

4 years ago

6.2.0-alpha.15

4 years ago

6.2.0-alpha.14

4 years ago

6.2.0-alpha.13

4 years ago

6.1.14

4 years ago

6.2.0-alpha.11

4 years ago

6.2.0-alpha.12

4 years ago

6.1.12

4 years ago

6.2.0-alpha.10

4 years ago

6.2.0-alpha.9

4 years ago

6.2.0-alpha.8

4 years ago

6.2.0-alpha.7

4 years ago

6.2.0-alpha.6

4 years ago

6.1.11

4 years ago

6.2.0-alpha.5

4 years ago

6.2.0-alpha.4

4 years ago

6.2.0-alpha.3

4 years ago

6.1.10

4 years ago

6.2.0-alpha.2

4 years ago

6.2.0-alpha.1

4 years ago

6.2.0-alpha.0

4 years ago

6.1.9

4 years ago

6.1.8

4 years ago

6.1.7

4 years ago

6.1.6

4 years ago

6.1.5

4 years ago

6.1.4

4 years ago

6.1.3

4 years ago

6.1.2

4 years ago

6.1.1

4 years ago

6.1.0-rc.6

4 years ago

6.1.0-rc.5

4 years ago

6.1.0

4 years ago

6.1.0-rc.4

4 years ago

6.1.0-rc.3

4 years ago

6.1.0-rc.2

4 years ago

6.1.0-rc.1

4 years ago

6.1.0-rc.0

4 years ago

6.1.0-beta.7

4 years ago

6.1.0-beta.6

4 years ago

6.1.0-beta.5

4 years ago

6.1.0-beta.4

4 years ago

6.1.0-beta.3

4 years ago

6.1.0-beta.2

4 years ago

6.1.0-beta.1

4 years ago

6.1.0-beta.0

4 years ago

6.1.0-alpha.35

4 years ago

6.1.0-alpha.34

4 years ago

6.0.28

4 years ago

6.1.0-alpha.33

4 years ago

6.1.0-alpha.32

4 years ago

6.0.28-alpha.2

4 years ago

6.0.28-alpha.1

4 years ago

6.0.28-alpha.3

4 years ago

6.0.28-alpha.0

4 years ago

6.1.0-alpha.31

4 years ago

6.1.0-alpha.30

4 years ago

6.0.27

4 years ago

6.1.0-alpha.29

4 years ago

6.1.0-alpha.28

4 years ago

6.1.0-alpha.27

4 years ago

6.1.0-alpha.26

4 years ago

6.1.0-alpha.25

4 years ago

6.1.0-alpha.24

4 years ago

6.1.0-alpha.23

4 years ago

6.1.0-alpha.22

4 years ago

6.1.0-alpha.21

4 years ago

6.0.26

4 years ago

6.1.0-alpha.20

4 years ago

6.0.25

4 years ago

6.0.24

4 years ago

6.0.23

4 years ago

6.1.0-alpha.19

4 years ago

6.1.0-alpha.18

4 years ago

6.1.0-alpha.17

4 years ago

6.0.22

4 years ago

6.1.0-alpha.16

4 years ago

6.1.0-alpha.15

4 years ago

6.1.0-alpha.14

4 years ago

6.1.0-alpha.12

4 years ago

6.1.0-alpha.11

4 years ago

6.1.0-alpha.10

4 years ago

6.1.0-alpha.9

4 years ago

6.1.0-alpha.8

4 years ago

6.1.0-alpha.7

4 years ago

6.1.0-alpha.6

4 years ago

6.1.0-alpha.4

4 years ago

6.1.0-alpha.3

4 years ago

6.0.21

4 years ago

6.1.0-alpha.1

4 years ago

6.1.0-alpha.0

4 years ago

6.0.20

4 years ago

5.3.21

4 years ago

6.0.19

4 years ago

5.3.20

4 years ago

6.0.18

4 years ago

6.0.17

4 years ago

6.0.16

4 years ago

6.0.15

4 years ago

6.0.14

4 years ago

6.0.13

4 years ago

6.0.12

4 years ago

6.0.11

4 years ago

6.0.10

4 years ago

6.0.9

4 years ago

6.0.7

4 years ago

6.0.6

4 years ago

6.0.5

4 years ago

6.0.4

4 years ago

6.0.1

4 years ago

6.0.3

4 years ago

6.0.2

4 years ago

6.0.0

4 years ago

6.0.0-rc.30

4 years ago

6.0.0-rc.29

4 years ago

6.0.0-rc.28

4 years ago

6.0.0-rc.27

4 years ago

6.0.0-rc.26

4 years ago

6.0.0-rc.25

4 years ago

6.0.0-rc.24

4 years ago

6.0.0-rc.23

4 years ago

6.0.0-rc.22

4 years ago

6.0.0-rc.21

4 years ago

6.0.0-rc.20

4 years ago

6.0.0-rc.19

4 years ago

6.0.0-rc.18

4 years ago

6.0.0-rc.16

4 years ago

6.0.0-rc.15

4 years ago

6.0.0-rc.14

4 years ago

6.0.0-rc.13

4 years ago

6.0.0-rc.12

4 years ago

6.0.0-rc.11

4 years ago

6.0.0-rc.10

4 years ago

6.0.0-rc.9

4 years ago

6.0.0-rc.8

4 years ago

6.0.0-rc.5

4 years ago

6.0.0-rc.3

4 years ago

6.0.0-rc.2

4 years ago

6.0.0-rc.1

4 years ago

6.0.0-beta.46

4 years ago

6.0.0-rc.0

4 years ago

6.0.0-beta.45

4 years ago

6.0.0-beta.44

4 years ago

6.0.0-beta.43

4 years ago

6.0.0-beta.42

4 years ago

6.0.0-beta.41

4 years ago

6.0.0-beta.40

4 years ago

6.0.0-beta.39

4 years ago

6.0.0-beta.38

4 years ago

6.0.0-beta.37

4 years ago

6.0.0-beta.36

4 years ago

6.0.0-beta.35

5 years ago

6.0.0-beta.34

5 years ago

6.0.0-beta.33

5 years ago

6.0.0-beta.32

5 years ago

6.0.0-beta.31

5 years ago

6.0.0-beta.30

5 years ago

6.0.0-beta.29

5 years ago

6.0.0-beta.28

5 years ago

6.0.0-beta.27

5 years ago

6.0.0-beta.26

5 years ago

6.0.0-beta.25

5 years ago

6.0.0-beta.24

5 years ago

6.0.0-beta.23

5 years ago

6.0.0-beta.22

5 years ago

6.0.0-beta.21

5 years ago

6.0.0-beta.20

5 years ago

6.0.0-beta.19

5 years ago

6.0.0-beta.18

5 years ago

6.0.0-beta.17

5 years ago

6.0.0-beta.16

5 years ago

6.0.0-beta.15

5 years ago

6.0.0-beta.14

5 years ago

5.3.19

5 years ago

6.0.0-beta.13

5 years ago

6.0.0-beta.12

5 years ago

6.0.0-beta.11

5 years ago

6.0.0-beta.9

5 years ago

6.0.0-beta.8

5 years ago

6.0.0-beta.7

5 years ago

6.0.0-beta.6

5 years ago

6.0.0-beta.5

5 years ago

6.0.0-beta.4

5 years ago

6.0.0-beta.3

5 years ago

6.0.0-beta.2

5 years ago

6.0.0-beta.1

5 years ago

6.0.0-alpha.46

5 years ago

6.0.0-beta.0

5 years ago

6.0.0-alpha.45

5 years ago

6.0.0-alpha.44

5 years ago

6.0.0-alpha.43

5 years ago

6.0.0-alpha.42

5 years ago

6.0.0-alpha.40

5 years ago

6.0.0-alpha.41

5 years ago

6.0.0-alpha.39

5 years ago

6.0.0-alpha.37

5 years ago

6.0.0-alpha.34

5 years ago

6.0.0-alpha.35

5 years ago

6.0.0-alpha.36

5 years ago

6.0.0-alpha.33

5 years ago

6.0.0-alpha.32

5 years ago

6.0.0-alpha.31

5 years ago

5.3.18

5 years ago

6.0.0-alpha.30

5 years ago

6.0.0-alpha.29

5 years ago

6.0.0-alpha.28

5 years ago

5.3.17

5 years ago

6.0.0-alpha.27

5 years ago

5.3.15

5 years ago

6.0.0-alpha.26

5 years ago

6.0.0-alpha.24

5 years ago

6.0.0-alpha.25

5 years ago

6.0.0-alpha.22

5 years ago

6.0.0-alpha.21

5 years ago

6.0.0-alpha.20

5 years ago

5.3.14

5 years ago

6.0.0-alpha.19

5 years ago

6.0.0-alpha.17

5 years ago

6.0.0-alpha.18

5 years ago

6.0.0-alpha.15

5 years ago

6.0.0-alpha.14

5 years ago

6.0.0-alpha.13

5 years ago

6.0.0-alpha.12

5 years ago

5.3.13

5 years ago

6.0.0-alpha.11

5 years ago

6.0.0-alpha.10

5 years ago

6.0.0-alpha.9

5 years ago

6.0.0-alpha.7

5 years ago

6.0.0-alpha.8

5 years ago

6.0.0-alpha.6

5 years ago

5.3.12

5 years ago

5.3.11

5 years ago

6.0.0-alpha.5

5 years ago

6.0.0-alpha.4

5 years ago

5.3.10

5 years ago

6.0.0-alpha.3

5 years ago

6.0.0-alpha.2

5 years ago

5.3.9

5 years ago

6.0.0-alpha.1

5 years ago

5.3.8

5 years ago

6.0.0-alpha.0

5 years ago

5.3.7

5 years ago

5.3.6

5 years ago

5.3.5

5 years ago

5.3.4

5 years ago

5.3.3

5 years ago

5.3.2

5 years ago

5.3.1

5 years ago

5.3.0

5 years ago

5.3.0-rc.14

5 years ago

5.3.0-rc.13

5 years ago

5.3.0-rc.12

5 years ago

5.3.0-rc.11

5 years ago

5.3.0-rc.10

5 years ago

5.3.0-rc.9

5 years ago

5.3.0-rc.8

5 years ago

5.3.0-rc.7

5 years ago

5.3.0-rc.6

5 years ago

5.3.0-rc.5

5 years ago

5.3.0-rc.4

5 years ago

5.3.0-rc.3

5 years ago

5.3.0-rc.1

5 years ago

5.3.0-rc.0

5 years ago

5.3.0-beta.31

5 years ago

5.3.0-beta.29

5 years ago

5.3.0-beta.27

5 years ago

5.3.0-beta.28

5 years ago

5.3.0-beta.30

5 years ago

5.3.0-beta.26

5 years ago

5.3.0-beta.25

5 years ago

5.3.0-beta.23

5 years ago

5.3.0-beta.22

5 years ago

5.3.0-beta.21

5 years ago

5.3.0-beta.20

5 years ago

5.3.0-beta.19

5 years ago

5.3.0-beta.18

5 years ago

5.3.0-beta.17

5 years ago

5.3.0-beta.16

5 years ago

5.3.0-beta.15

5 years ago

5.2.8

5 years ago

5.3.0-beta.14

5 years ago

5.3.0-beta.13

5 years ago

5.2.7

5 years ago

5.3.0-beta.12

5 years ago

5.3.0-beta.11

5 years ago

5.3.0-beta.10

5 years ago

5.3.0-beta.9

5 years ago

5.3.0-beta.8

5 years ago

5.3.0-beta.7

5 years ago

5.3.0-beta.6

5 years ago

5.3.0-beta.3

5 years ago

5.3.0-alpha.46

5 years ago

5.3.0-alpha.47

5 years ago

5.3.0-beta.0

5 years ago

5.3.0-beta.2

5 years ago

5.3.0-beta.1

5 years ago

5.3.0-alpha.45

5 years ago

5.3.0-alpha.44

5 years ago

5.3.0-alpha.43

5 years ago

5.2.6

5 years ago

5.3.0-alpha.42

5 years ago

5.3.0-alpha.41

5 years ago

5.3.0-alpha.40

5 years ago

5.3.0-alpha.39

5 years ago

5.3.0-alpha.38

5 years ago

5.3.0-alpha.37

5 years ago

5.3.0-alpha.36

5 years ago

5.3.0-alpha.35

5 years ago

5.3.0-alpha.34

5 years ago

5.3.0-alpha.33

5 years ago

5.3.0-alpha.32

5 years ago

5.3.0-alpha.31

5 years ago

5.3.0-alpha.30

5 years ago

5.3.0-alpha.29

5 years ago

5.3.0-alpha.28

5 years ago

5.3.0-alpha.27

5 years ago

5.3.0-alpha.26

5 years ago

5.3.0-alpha.25

5 years ago

5.3.0-alpha.24

5 years ago

5.2.5

5 years ago

5.3.0-alpha.23

5 years ago

5.3.0-alpha.22

5 years ago

5.3.0-alpha.21

5 years ago

5.3.0-alpha.20

5 years ago

5.3.0-alpha.19

5 years ago

5.2.4

5 years ago

5.3.0-alpha.18

5 years ago

5.3.0-alpha.17

5 years ago

5.3.0-alpha.15

5 years ago

5.3.0-alpha.13

5 years ago

5.3.0-alpha.12

5 years ago

5.2.3

5 years ago

5.2.2

5 years ago

5.3.0-alpha.11

5 years ago

5.3.0-alpha.10

5 years ago

5.3.0-alpha.9

5 years ago

5.3.0-alpha.8

5 years ago

5.3.0-alpha.7

5 years ago

5.3.0-alpha.6

5 years ago

5.3.0-alpha.5

5 years ago

5.3.0-alpha.4

5 years ago

5.3.0-alpha.3

5 years ago

5.3.0-alpha.2

5 years ago

5.3.0-alpha.1

5 years ago

5.2.1

5 years ago

5.3.0-alpha.0

5 years ago

5.2.0

5 years ago

5.2.0-rc.11

5 years ago

5.2.0-rc.10

5 years ago

5.2.0-rc.9

5 years ago

5.2.0-rc.8

5 years ago

5.2.0-rc.6

5 years ago

5.2.0-rc.5

5 years ago

5.2.0-rc.4

5 years ago

5.2.0-rc.2

5 years ago

5.2.0-rc.1

5 years ago

5.2.0-rc.0

5 years ago

5.2.0-beta.48

5 years ago

5.2.0-beta.47

5 years ago

5.2.0-beta.46

5 years ago

5.2.0-beta.45

5 years ago

5.2.0-beta.43

5 years ago

5.2.0-beta.42

5 years ago

5.2.0-beta.41

5 years ago

5.2.0-beta.40

5 years ago

5.2.0-beta.39

5 years ago

5.2.0-beta.38

5 years ago

5.2.0-beta.37

5 years ago

5.2.0-beta.36

5 years ago

5.2.0-beta.33

5 years ago

5.2.0-beta.32

5 years ago

5.2.0-beta.31

5 years ago

5.2.0-beta.30

5 years ago

5.2.0-beta.29

5 years ago

5.2.0-beta.28

5 years ago

5.2.0-beta.26

5 years ago

5.2.0-beta.25

5 years ago

5.2.0-beta.24

5 years ago

5.2.0-beta.23

5 years ago

5.2.0-beta.22

5 years ago

5.2.0-beta.21

5 years ago

5.2.0-beta.20

5 years ago

5.2.0-beta.19

5 years ago

5.2.0-beta.18

5 years ago

5.2.0-beta.17

5 years ago

5.2.0-beta.16

5 years ago

5.2.0-beta.15

5 years ago

5.2.0-beta.14

5 years ago

5.2.0-beta.13

5 years ago

5.2.0-beta.12

5 years ago

5.2.0-beta.10

5 years ago

5.2.0-beta.9

5 years ago

5.2.0-beta.8

5 years ago

5.2.0-beta.7

5 years ago

5.2.0-beta.6

5 years ago

5.2.0-beta.5

5 years ago

5.2.0-beta.4

5 years ago

5.2.0-beta.3

5 years ago

5.2.0-beta.2

5 years ago

5.2.0-beta.1

5 years ago

5.2.0-beta.0

5 years ago

5.2.0-alpha.44

5 years ago

5.2.0-alpha.43

5 years ago

5.2.0-alpha.42

5 years ago

5.2.0-alpha.41

5 years ago

5.2.0-alpha.40

5 years ago

5.2.0-alpha.39

5 years ago

5.2.0-alpha.38

5 years ago

5.2.0-alpha.37

5 years ago

5.2.0-alpha.36

5 years ago

5.2.0-alpha.35

5 years ago

5.2.0-alpha.34

5 years ago

5.2.0-alpha.33

5 years ago

5.2.0-alpha.32

5 years ago

5.2.0-alpha.31

5 years ago

5.2.0-alpha.30

6 years ago

5.2.0-alpha.29

6 years ago

5.2.0-alpha.28

6 years ago

5.2.0-alpha.27

6 years ago

5.2.0-alpha.26

6 years ago

5.2.0-alpha.24

6 years ago