Use this article when you want your widget to feel like a real mini codebase (for example: index.html, styles.css, script.js) instead of one long code block.
Why this matters
When visitors can switch between related files in a logical order, they understand your example faster and copy the right parts without confusion.
Step 1: Add and name each file tab
Open your Code Snippet widget.
Go to the Content tab.
Click Add a Snippet for each file you want.
For each snippet card:
Step 2: Arrange tab order to match reading flow
In the file list, drag items using the drag handle.
Put files in the sequence your audience should read (example: config -> component -> usage).
Keep the first tab as your “starting point” file.
Step 3: Format each file before publishing
Open each snippet card.
Click Format Code.
Check spacing/indentation in preview to avoid hard-to-read blocks.
Best practices for better results
Keep tab names real and specific (
auth.service.tsis better thanfile1).Use the correct language per file so syntax coloring looks right.
Avoid adding too many tabs in one widget; split into multiple widgets if the example gets too large.
Use the search box in Content when managing many files quickly.



