Wrappers

ExampleWrapper

A flexible component that displays both rendered Svelte components and their source code side-by-side. Supports name-based lookup or direct component/code props with automatic $lib import replacement.

The above code produces the following actual output and code:

MyExampleWrapper

Project-specific wrapper that auto-discovers example components from a directory, simplifying usage to just passing a component name.

If you have multiple files to display, it is possible to use ExampleWrapper. Create MyExampleWrapper as the following:

And use this as the following:

The following is the output.