Experimental Features
Opt-in APIs that are useful today but may evolve in future Boltdocs versions.
Experimental APIs are disabled by default. They are documented as first-class features, but their contracts may evolve before stabilizing.
Enable only the features you need. If you ship a reusable theme or plugin, keep a fallback for projects that haven't enabled them yet.
import { defineConfig } from 'boltdocs'
export default defineConfig({
experimental: {
viewTransitions: {
enabled: true,
types: ['page'],
},
fileRouting: true,
},
})
In this section
The experimental surface is split into three feature areas, each documented on its own page:
- View Transitions — native browser animations between router states, with directional transition types and live
prefers-reduced-motionsupport, plus theTransitionLinkcomponent and theuseViewTransition()hook. - Structured Data — type-safe JSON-LD graphs for website, article, and breadcrumbs.
- Static file routing — map files in
docs/pages-external/to routes, including dynamic segments such as[slug]and[...parts].
What changed in 3.4.0
Both experimental features received substantial work in 3.4.0.
View Transitions now track navigation direction and forward it as a forward or back transition type, so a theme can animate backward navigation differently. They also respect prefers-reduced-motion: when the visitor asks for reduced motion the navigation happens immediately, because a document-wide animation is exactly what that setting is meant to suppress.
File routing now supports dynamic segments. A bracketed file or directory maps to a router pattern, so blog/[slug].mdx serves /blog/:slug and docs/[...parts].mdx serves /docs/*. Static files behave exactly as before.
Declarative redirects are not experimental: they are a stable configuration option in 3.4.0.