caliper

Richer React props. Faster Storybook docs.

build
pre-release
GitHub

Why Caliper

the problem

Fast prop docs miss inherited types. Thorough ones make Storybook wait for a full TypeScript program.

what it does

Caliper reads source and package types with OXC and Rust, then gives Storybook the props, defaults and descriptions it needs.

Works with Storybook 10 and 11 today. The next alpha adds on-demand lookup and an experimental TypeScript 7.1 opt-in.

Types in. Controls out.

One real Button from Caliper’s Storybook 11 integration test.

Button.tsx / argTypes
Storybook 11 integration fixture
01 / source
interface ButtonProps {
  /** The text on the button. */
  label: string

  /** Visual weight. */
  variant?:
    | 'primary'
    | 'secondary'
    | 'ghost'
}

// default in the component
variant = 'primary'
02 / Storybook receives8 props
variantenum · optional

Visual weight.

literal choices"primary" | "secondary" | "ghost"
defaultprimary
labelstring · required

The text on the button.

also returned
  • size
  • disabled
  • count
  • onClick
  • icon
  • primary

Real Storybook 11 integration fixture. Source excerpt reformatted for this view.

Choose your setup

The hero command installs the CLI. For Storybook, use the package for your version.

Storybook 11: install the addon and use its docgen provider
// npm install --save-dev caliper-docgen-storybook
// .storybook/main.ts
export default {
  framework: '@storybook/react-vite',
  addons: [
    { name: 'caliper-docgen-storybook', options: { srcDirs: ['src'] } },
  ],
}
Storybook 10: inject __docgenInfo through Vite
// npm install --save-dev caliper-docgen-vite-plugin
// .storybook/main.ts
import { caliperDocgen } from 'caliper-docgen-vite-plugin'

export default {
  framework: '@storybook/react-vite',
  typescript: { reactDocgen: false },
  viteFinal: (config) => ({
    ...config,
    plugins: [...(config.plugins ?? []), caliperDocgen({
      srcDirs: ['src'],
      loadDependencies: true,
      injectDocgenInfo: true,
    })],
  }),
}
CLI: inspect one component or check the project in CI
npx caliper-docgen inspect Button --src src
npx caliper-docgen check --src src

Save. See updated props.

Caliper keeps a session open while you work.

Storybook 10

  • The Vite plugin updates docs for changed components while React Fast Refresh keeps working.

Storybook 11

  • Each docgen request sees saved edits. If Caliper cannot fully describe a component, Storybook’s own docgen can take over.
  • The next alpha resolves a component when its story asks for it, instead of doing every component up front.

Early source run: 129 React Spectrum stories took 0.63 s of addon request time, 4 ms at the median and 150 ms for the first request. October 24; not browser rendering or a 0.5.0 package result. How we measure dev mode

How it stacks up

The RDT (react-docgen-typescript) results use five installed libraries. The three-tool race uses 21 fixtures. Both ran in October 2026; newer work needs a rerun.

Cold run through one Node harness
  • Caliper0.38 s
  • react-docgen0.52 s
  • RDT4.9 s

21 fixture libraries, Apple M5 Max, five runs, October 2026. About 0.32 s is shared harness startup.

99.7%
of RDT’s non-React props found on matched Mantine and Spectrum components
0.4.0 parity baseline, installed dependencies, 2026-10-23
28×
faster than RDT at the median of five installed libraries
0.4.0 parity baseline, Caliper process start included; RDT timed in-process

Go deeper

The chart is the short version. The details are here when you need them.

Before you try it

  • Install 0.5.0 now. On-demand Storybook lookup lands in the next alpha.
  • Coverage varies by library. shadcn/ui and Ant Design have the largest measured prop gaps; newer fixes need a rerun.
  • TypeScript 7.1 is an experimental CLI opt-in. It checks exported function components; Storybook support is still ahead.
  • Dependency loading is opt-in in 0.5.0. Use --load-dependencies in the CLI or loadDependencies: true in the Vite plugin; the Storybook 11 addon gets the option next alpha.
  • Storybook 11 can fall back to its own docgen. On Storybook 10, turn off its transform to keep Caliper’s output.
  • FSL-1.1-MIT licensed. Each release becomes MIT after two years.

What you get

Useful prop docs in Storybook, in a build or from the command line.

Richer props

  • Names, types, defaults and descriptions, with JSDoc close by.
  • Inherited HTML props and types from installed packages.
  • Literal choices from CVA, Tailwind Variants and Panda recipes. Some shadcn variants stay specific where RDT prints string.

Keep the table useful

  • Choose a curated, full or empty set of inherited HTML props.
  • Collapse large inherited groups when they crowd the table.
  • See a diagnostic when a type cannot be resolved.

Use it your way

  • Storybook 10 and 11 addons, plus a Vite plugin for build-time docs.
  • CLI and Node binding for extraction, watch mode and custom tools; choose JSON, RDT or TOON output.
  • An experimental TypeScript 7.1 CLI pass is an opt-in for the next alpha.

What it supports

Outside Orin DX

External integrations
integrationstatus
Storybook 11Addon for the docgen server; can fall back to Storybook’s own docgen
Storybook 10Vite plugin adds __docgenInfo; requires Vite 7 or 8
Vite 7 and 8Plugin exposes a JSON module and updates it over HMR

What those types look like

First Caliper finds the component. Then it reads the shape of its props. These examples show where each step stands.

  1. A typed React wrapper

    Works today
    type Props = {
      tone?: 'quiet' | 'loud'
    }
    export const Button = memo(
      (props: Props) => <button />
    )

    Found today. Caliper reads the named props and keeps the literal choices.

  2. Props reused from another type

    Works today
    type Props = Pick<
      ButtonProps,
      'size' | 'disabled'
    >

    Resolved today, including types from declaration files, imports and installed packages when dependency loading is on.

  3. A type that depends on a generic

    Next alpha · CLI opt-in
    type Props<T> = T extends string
      ? { label: T }
      : { count: number }
    export function Field(
      props: Props<string>
    ) {
      return null
    }

    The regular result can stay opaque. The experimental TypeScript 7.1 CLI opt-in in the next alpha can recover some props on exported function components.

  4. A component Caliper cannot find yet

    Still working on it
    const Button = styled.button`
      color: red;
    `

    This styled template form may be missed. The checker reads components Caliper already found; it does not discover missing ones.

Inside Orin DX

  • caliper
  • callistoCallisto versions and publishes Caliper’s packages.
caliper
  • callistoCallisto versions and publishes Caliper’s packages.

Coming up

The next alpha brings more of the current source work to npm.

  • Ship the on-demand Storybook 11 session, richer dependency support and experimental TypeScript 7.1 CLI pass.
  • Keep closing prop gaps and speed up lazy sessions. Both have active PRs.
  • Ask TypeScript only when Caliper is unsure about a component. That selective fallback is still planned.
  • Rerun quality and speed comparisons once the open work lands. Early estimates put median speed near 31× RDT with dependencies loaded.