Storybook: UI: Add external links to navigation

Created on 10 Sep 2019  路  6Comments  路  Source: storybookjs/storybook

The left-hand navigation of storybook consists of links to stories, arranged hierarchically. The Storybook logo link is also configurable (as well as visually).

In 5.2, we added the ability to link to "documentation-only stories" which is markdown-based documentation that can be interspersed within your stories.

Let's also allow the user to embed links to other external resources in the same navigation tree.

One possible implementation

In storiesOf:

storiesOf(...)
  .add('storybook website', 'http://storybook.js.org', { isLink: true })

In CSF:

export default { ... }
export const storybookWebsite = 'http://storybook.js.org'
storybookWebsite.story {
  isLink: true,
}

In MDX:

<Navigation name='storybook website' href='http://storybook.js.org' />
csf feature request todo ui

Most helpful comment

Is there a workaround to achieve this functionality now? Like hooking into the Storybook API somehow to redirect to an external page when a specific story is selected?

All 6 comments

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Is there a workaround to achieve this functionality now? Like hooking into the Storybook API somehow to redirect to an external page when a specific story is selected?

This feature is especially important for design systems and documentation. Has the implementation already started @shilman?

Nope, @fabian-hiller want to give it a try?

Nope, @fabian-hiller want to give it a try?

Yes I want to take a look at it. Can you give me a hint in which files to search?

Was this page helpful?
0 / 5 - 0 ratings