Multi-file demos

An external demo's entry file can import other local files, and the whole import graph comes along — one editor tab per file:

Loading demo…

Only the entry file is named in the MDX. Tabs are labelled by each file's path relative to the entry's directory, so buttons/styles.ts and cards/styles.ts stay distinct.

The import statements inside demo files resolve like your bundler's, and can be extensionless: ./Button is tried as .tsx, .ts, .jsx, .js, then Button/index.*.