Skip to content

Starlight Examples

Practical examples of doing stuff in Starlight documentation sites, accompanied by StackBlitz embeds.

How to use

Each of these examples demonstrates how to do a specific thing in a Starlight documentation site. Most pages include a short description of the technique being demonstrated, but these are not fully formed guides or tutorials.

Each example features a StackBlitz embed of a complete Starlight project implementing the technique in question. The embeds contain a live code editor and a preview pane. Embeds work best on larger screens, but will load on mobile too if needed.

You can use the embeds to:

  • See a preview of the technique
  • Click around the different files to see how they implement things
  • Edit the code and see changes reflected in the preview pane

Many of the examples included here demonstrate a concept, but may need modifying for your specific use case. Feel free to copy and edit code as you need to.

All examples on this site are licensed for re-use under an MIT License.

Contribute

Add your own example!