storySort: support sorting a kind to the bottom of the list
See original GitHub issueIs your feature request related to a problem? Please describe
We recently upgraded to Storybook 6, and so far it has been a big improvement. The new storySort order option greatly simplifies our configuration, which is awesome. However, we currently have our component stories sorted like this:
- Guides
- [alphabetical list of all components in our library]
- Internal
- WIP
From what I can tell, in order to get this sorting with the new order config, we would need to manually list out every single component in the library.
Describe the solution you’d like
The simplest solution would be to support a * option in the list which means “anything (at this level) not explicitly listed here,” which would make the configuration look like:
order: ['Guides', '*', 'Internal', 'WIP']
or for second-level ordering:
order: ['Components', ['Guides', '*', 'Internal', 'WIP'], 'Pages']
Describe alternatives you’ve considered
Another option would be to have some sort of signifier such as ! in front of the options (to match anything except the specified option). For example:
order: ['Guides', '!Internal', '!WIP']
but personally I find this syntax might be a bit confusing.
Are you able to assist to bring the feature to reality? I am willing to help contribute this fix to the library.
Additional context N/A
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)

Top Related StackOverflow Question
This doesn’t seem to work the way that I expected in nested stories. I assumed I would be able to use it like so to say that within Components category, subitems named ‘Overview’ should be sorted first.
This seems to have no effect? I was expecting to see Components/Button/Overview in the sidebar with Overview displayed as the first item underneath Button.
I was hoping to avoid having to write out every component (which should already be in alphabetical order) in order to sort the pages underneath each component.
Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.3.0-alpha.3 containing PR #14531 that references this issue. Upgrade today to the
@nextNPM tag to try it out!Closing this issue. Please re-open if you think there’s still more to do.