• Version 7.0.2
  • Published
  • 237 kB
  • 11 dependencies
  • MIT license


npm i @storybook/addon-knobs
yarn add @storybook/addon-knobs
pnpm add @storybook/addon-knobs


Storybook addon for editing props



variable ADDON_ID

const ADDON_ID: string;

    variable CHANGE

    const CHANGE: string;

      variable CLICK

      const CLICK: string;

        variable PANEL_ID

        const PANEL_ID: string;

          variable PARAM_KEY

          const PARAM_KEY: string;

            variable RESET

            const RESET: string;

              variable SET

              const SET: string;

                variable SET_OPTIONS

                const SET_OPTIONS: string;

                  variable withKnobs

                  const withKnobs: any;


                    function array

                    array: (
                    name: string,
                    value: ArrayTypeKnobValue,
                    separator?: string,
                    groupId?: string
                    ) => string[];

                      function boolean

                      boolean: (name: string, value: boolean, groupId?: string) => Mutable<boolean>;

                        function button

                        button: (
                        name: string,
                        callback: ButtonTypeOnClickProp,
                        groupId?: string
                        ) => undefined;

                          function color

                          color: (name: string, value: string, groupId?: string) => string;

                            function date

                            date: (name: string, value?: Date, groupId?: string) => number;

                              function files

                              files: (
                              name: string,
                              accept: string,
                              value?: string[],
                              groupId?: string
                              ) => string[];

                                function knob

                                knob: <
                                T extends
                                | 'number'
                                | 'boolean'
                                | 'object'
                                | 'text'
                                | 'color'
                                | 'select'
                                | 'radios'
                                | 'array'
                                | 'date'
                                | 'button'
                                | 'files'
                                | 'options',
                                V = Mutable<Knob<T>['value']>
                                name: string,
                                options: Knob<T>
                                ) => V;

                                  function number

                                  number: (
                                  name: string,
                                  value: number,
                                  options?: NumberTypeKnobOptions,
                                  groupId?: string
                                  ) => number;

                                    function object

                                    object: <T>(name: string, value: T, groupId?: string) => T;

                                      function optionsKnob

                                      optionsKnob: <T extends OptionsTypeKnobSingleValue>(
                                      name: string,
                                      valuesObj: OptionsTypeOptionsProp<T>,
                                      value: OptionsTypeKnobValue<T>,
                                      optionsObj: OptionsKnobOptions,
                                      groupId?: string
                                      ) => T;

                                        function radios

                                        radios: <T extends RadiosTypeKnobValue>(
                                        name: string,
                                        options: RadiosTypeOptionsProp<T>,
                                        value: T,
                                        groupId?: string
                                        ) => T;

                                          function select

                                          select: <T extends SelectTypeKnobValue>(
                                          name: string,
                                          options: SelectTypeOptionsProp<T>,
                                          value: T,
                                          groupId?: string
                                          ) => T;

                                            function text

                                            text: (name: string, value: string, groupId?: string) => string;

                                              Package Files (2)

                                              Dependencies (11)

                                              Dev Dependencies (28)

                                              Peer Dependencies (7)


                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@storybook/addon-knobs.

                                              • Markdown
                                              • HTML
                                                <a href="https://www.jsdocs.io/package/@storybook/addon-knobs"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>