Skip to content

Last updated: First published:

The Jotter on Starlight

At some point I realized that I needed to structure my bits & pieces better and make them searchable to make them useful.

The desire to add view transitions to Starlight is a logical, but not trivial venture. Others have done it before. Chapeau @Fryuni! This Jotter is also a tech demo for Starlight on View Transitions.

Starlight does a great job of supporting documentation sites. You really don’t need view transitions on a documentation site to distract your audience from the content unless you are a site about view transitions. Starlight is an opinionated framework. It works best when you use it as it is intended and only customize what is designated to be customized.

Supporting view transitions for Starlight is not just about cross-fade navigation. There is a wide range of design options. Everyone has different preferences.

Will the Bag offer Support for Starlight?

Yes, it has already started. The πŸ‘œ Bag of Tricks ✨ provides initial basic support for view transitions for Starlight sites!

In the future, in the best of all worlds, The Bag can provide small, independent gadgets that developers can combine as they wish. Keep your fingers crossed ;-) and stay tuned. The future is here, and so are the first additional components to choose from!

There are a few things that need to be configured to enable view transitions in Starlight. Others are more optional. The mandatory changes are covered by the initial view transition support for Starlight sites by The Bag. Other features followed.

KindOptionComponent
MandatoryThe basic view transition support in just three stepsVtbot Starlight Support
OptionalIndicate that the system is processing the clickLoadingIndicator
OptionalEliminate the pseudo scrolling of the main areaPageOffset
OptionalDerive the direction of view transitions from the order of pages in the sidebarPageOrder
OptionalSimple way to declaratively add morph transitions to elements by just defining a CSS selectorAutoNameSelected
OptionalMake incoming view transitions reload instead, e.g. to properly reinitialize ReplacementSwap realmsBorderControl
OptionalChange the default handling of the sidebarVtbot Starlight

Select your preferred mix from the custom combo options now!

Read on if you want to know what encounters I had on my journey to a Starlight website with view transitions.