import { CodeBlock } from "../../components/CodeBlock.tsx"; import { CodeWindow } from "../../components/CodeWindow.tsx"; import { PageSection } from "../../components/PageSection.tsx"; import { SideBySide } from "../../components/SideBySide.tsx"; import { SectionHeading } from "../../components/homepage/SectionHeading.tsx"; import { FancyLink } from "../../components/FancyLink.tsx"; const transitionCode = `import { App } from "fresh"; const app = new App({ // Enable the View Transitions API // for smooth client-side navigation viewTransition: true, }); app.listen();`; const cssCode = `/* Style your transitions with CSS */ ::view-transition-old(root) { animation: fade-out 0.2s ease-in; } ::view-transition-new(root) { animation: fade-in 0.2s ease-out; }`; export function TransitionsSection() { return (
Smooth View Transitions

Fresh supports the{" "} View Transitions API {" "} out of the box, giving your app native-feeling page transitions with a single config flag.

Pages crossfade automatically. Customize animations per-element with plain CSS — no JavaScript animation libraries needed.

Learn about View Transitions
); }