• Version 7.6.17
  • Published
  • 58.2 kB
  • 10 dependencies
  • MIT license


npm i @storybook/svelte
yarn add @storybook/svelte
pnpm add @storybook/svelte


Storybook Svelte renderer



variable configure

const configure: (loader: Addon_Loadable, module: NodeModule) => void;

    variable forceReRender

    const forceReRender: () => void;

      variable raw

      const raw: () => any;

        variable storiesOf

        const storiesOf: any;


          interface SvelteRenderer

          interface SvelteRenderer<C extends SvelteComponentTyped = SvelteComponentTyped>
          extends WebRenderer {}

            property component

            component: ComponentType<
            this['T'] extends Record<string, any> ? this['T'] : any

              property storyResult

              storyResult: this['T'] extends Record<string, any>
              ? SvelteStoryResult<this['T'], ComponentEvents<C>>
              : SvelteStoryResult;

                Type Aliases

                type Decorator

                type Decorator<TArgs = StrictArgs> = DecoratorFunction<SvelteRenderer, TArgs>;

                  type Loader

                  type Loader<TArgs = StrictArgs> = LoaderFunction<SvelteRenderer, TArgs>;

                    type Meta

                    type Meta<CmpOrArgs = Args> = CmpOrArgs extends SvelteComponentTyped<infer Props>
                    ? ComponentAnnotations<SvelteRenderer<CmpOrArgs>, Props>
                    : ComponentAnnotations<SvelteRenderer, CmpOrArgs>;
                    • Metadata to configure the stories for a component.

                      See Also

                      • [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)

                    type Preview

                    type Preview = ProjectAnnotations<SvelteRenderer>;

                      type StoryContext

                      type StoryContext<TArgs = StrictArgs> = StoryContext$1<SvelteRenderer, TArgs>;

                        type StoryFn

                        type StoryFn<TCmpOrArgs = Args> = TCmpOrArgs extends SvelteComponentTyped<
                        infer Props
                        ? AnnotatedStoryFn<SvelteRenderer, Props>
                        : AnnotatedStoryFn<SvelteRenderer, TCmpOrArgs>;
                        • Story function that represents a CSFv2 component example.

                          See Also

                          • [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)

                        type StoryObj

                        type StoryObj<MetaOrCmpOrArgs = Args> = MetaOrCmpOrArgs extends {
                        render?: ArgsStoryFn<SvelteRenderer, any>;
                        component?: ComponentType<infer Component>;
                        args?: infer DefaultArgs;
                        ? Simplify<
                        ComponentProps<Component> & ArgsFromMeta<SvelteRenderer, MetaOrCmpOrArgs>
                        > extends infer TArgs
                        ? StoryAnnotations<
                        SetOptional<TArgs, Extract<keyof TArgs, keyof DefaultArgs>>
                        : never
                        : MetaOrCmpOrArgs extends SvelteComponentTyped
                        ? StoryAnnotations<
                        : StoryAnnotations<SvelteRenderer, MetaOrCmpOrArgs>;
                        • Story function that represents a CSFv3 component example.

                          See Also

                          • [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)

                        Package Files (2)

                        Dependencies (10)

                        Dev Dependencies (4)

                        Peer Dependencies (1)


                        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/svelte.

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