Inkbridgeinkbridge
Free

Storybook Story Parsing

Stories are parsed and used as the source of truth for what the plugin renders in Figma.

PlanCard story in Storybook
Story in Storybook
PlanCard frame in Figma with colour variables
Generated Figma frame — colour variables visible in the right panel

How it works

The scanner reads your `.stories.tsx` files, extracts each named export, resolves its render function, and captures the decorator wrapper classes. The result is a `jsxTree` + `layoutClasses` pair per story that drives the exact Figma frame the plugin produces.

Usage

  1. 1

    Write stories using the standard Storybook CSF format (named exports in `.stories.tsx`).

  2. 2

    Each named story export becomes a separate Figma frame — 'Default', 'Variants', 'Sizes', etc.

  3. 3

    Decorator wrapper classes (e.g. `flex gap-4 p-8`) are captured and applied to the outer Figma frame.

  4. 4

    Stories with a `render` function are executed; stories with only `args` are merged with the component's default render.

  5. 5

    The scanner does not require Storybook itself to be running — it reads the files statically.

Related