storybookjs/storybook

[Bug]: Null can't show as a type with React/Vite/Typescript

Open

#32,106 opened on Jul 22, 2025

View on GitHub
 (2 comments) (3 reactions) (1 assignee)TypeScript (10,058 forks)batch import
argtypesbughelp wanted

Repository metrics

Stars
 (89,909 stars)
PR merge metrics
 (Avg merge 9d 3h) (173 merged PRs in 30d)

Description

Describe the bug

I expect to see string, null, and number as valid options but null is always removed. I've toggled every option I can find documentation for, but have not figured out how to get null to show.

Reproduction link

https://stackblitz.com/edit/github-fdkzfbvz?file=src%2Fstories%2FButton.tsx

Reproduction steps

  1. Go to above link
  2. See that it looks like screenshot above

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22621
    CPU: (24) x64 12th Gen Intel(R) Core(TM) i7-12850HX
  Binaries:
    Node: 22.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD <----- active
  Browsers:
    Edge: Chromium (136.0.3240.92)
  npmPackages:
    @storybook/addon-docs: ^9.0.18 => 9.0.18
    @storybook/addon-onboarding: ^9.0.18 => 9.0.18
    @storybook/react-vite: ^9.0.18 => 9.0.18
    eslint-plugin-storybook: ^9.0.18 => 9.0.18
    storybook: ^9.0.18 => 9.0.18

Additional context

No response

Contributor guide