Open-source project
igorm84/spotify-astro-transitions avatar
igorm84/spotify-astro-transitions

spotify-astro-transitions and what Astro's client router actually does to a page

Clone of Spotify with Astro 7 View Transitions integration for fluid navigation

650 stars93 forksAstroLicense varies

At a glance

What is it?
This is a Spotify-inspired interface built to demonstrate Astro's client router and View Transitions, with Tailwind CSS and Svelte, and its one notable decision is to configure the router with `fallback="none"` so browsers without native support get plain page loads. It is a reference implementation to read, not a music service, and the fallback choice is the most instructive line in the repository.
Who is it for?
spotify-astro-transitions fits a front end developer who wants to see Astro's client router and View Transitions applied to a real interface with a lot of pages, and who wants a reference for how the transition directives, the router and the fallback behave together. It is the wrong choice as a starting point for a music product, since it is a demonstration of one framework feature and carries no backend, no audio and no licensing from the service whose interface it copies.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly Astro, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A Spotify interface built to demonstrate one framework feature

The repository describes itself as a clone of Spotify with Astro 7 View Transitions integration for fluid navigation, and the readme is more precise about what it is for: a Spotify-inspired interface using Astro's client router and View Transitions for fluid navigation, with Tailwind CSS and Svelte alongside.

That is an unusual and useful shape for a project. It is not a music service, and it is not a general purpose Astro starter. It is an interface with a lot of pages, built to show what a page transition looks like when every navigation is a client side transition rather than a document load. The Spotify interface is chosen precisely because it has the properties that make transitions visible: a persistent shell, a sidebar, a grid of items, and navigation between many sibling pages where the layout stays the same and only the content changes.

There is a live demo at spotify-astro-transitions.vercel.app, and the readme links a video of the result. The repository is small and self describing, with a `.nvmrc`, `astro.config.mjs`, `svelte.config.js`, `tsconfig.json`, a `public/` directory, `src/`, and a `bun.lock`.

The framework generation is worth noting. The dependency list has `astro` at `^7.4.0` and `svelte` at `^5.57.2`, with the Svelte integration at `@astrojs/svelte` `^9.1.0`. So this is Astro 7 with Svelte 5, which is the current pairing rather than a legacy combination, and the name of the repository says Astro 7 explicitly.

Styling is Tailwind CSS at `^4.3.3` with the Vite plugin `@tailwindcss/vite`, and icons come from `astro-icon` with four `@iconify-json` icon sets: bi, carbon, ion and mdi.

The client router is what makes the transition possible

The mechanism underneath is Astro's client router, and the readme links to the framework's own guide on client router and View Transitions.

The split matters. Astro normally ships static HTML, and a navigation between two pages is a full document load: the browser discards the page, requests the next one, and rebuilds everything including the layout. With the client router, navigation is intercepted, the next page's content is fetched and swapped in, and the shared parts of the layout are preserved. That is what makes the animation possible, because the old and new DOM states coexist long enough to be cross-faded or moved.

Underneath that is the browser's own View Transitions API, which the readme explains in one line: View Transitions animate between DOM states. The links to the Astro documentation and to the MDN documentation for the View Transitions API are given in the About section, which is the right pointer for anyone who wants to understand the mechanism rather than just copy the config.

The design of a page transition in Astro is also more than a global switch. Each element that should animate in or out is annotated, and the transition is defined with names and CSS, which is where the interesting part of a repository like this lives. The Spotify shell is a good excuse for that, because a persistent sidebar and a changing content pane are exactly the case where a shared element transition reads well.

The key point for an adopter is that this is a routing change, not a decoration. Once the client router handles navigation, the document is not reloaded, so anything that relied on a fresh page load, on script re-execution, or on the unload event behaves differently. That is the trade the framework asks you to make, and it is the reason the fallback configuration below matters so much.

fallback=none is a decision, and the readme explains it

The most important line in the repository is the last one of the readme, and it is easy to skim past because it is short.

This project intentionally configures Astro's client router with `fallback="none"`. Older browsers still navigate, but use full-page navigation without animation.

The default behaviour of the client router is to fall back to a hard navigation when the browser does not support View Transitions, which means the user gets the page, just without the animation. Setting the fallback to none means the router does not attempt the transition at all in that case and lets the browser do a normal page load. The result is the same, navigation still works, but the router is out of the loop, which is a cleaner failure mode than a half applied transition.

The second half of the readme explains why that matters, and it is a browser support statement rather than a vague claim. Native same-document View Transitions are supported in Chrome and Edge 111+, Firefox 144+, Safari and iOS 18+, and corresponding mobile browsers, and MDN marks the feature as Baseline 2025.

So the audience for this project is a front end developer who wants to see the transitions working and who has decided how to treat the browsers that cannot do them. The decision is not described as a limitation to be worked around later. It is described as intentional, and that framing is the useful part for anyone copying the setup: a view transition demo that silently degrades into a spinner in an old browser is a worse demo than one that simply serves a page.

The support table also tells you when this stops being a consideration. Firefox 144 and Safari 18 are recent enough that the fallback matters for a slice of users, and MDN's Baseline 2025 marking means the feature is now broadly available.

Local development needs Bun and Node 22.22, and a check step

The developer setup is short and it pins its runtime versions more precisely than most examples do.

Node.js 22.22 or newer and Bun are required, and the package manifest carries the same constraint in its engines field with node at `>=22.22.0` and a `.nvmrc` file at the root to match. The local development commands are:

sh
bun install
bun run dev

The scripts in the manifest show what each command maps to. `dev` and `start` both run `astro dev`, `build` runs `astro build`, `preview` runs `astro preview`, and `check` runs `astro check`, which is the Astro content and type checker from `@astrojs/check` at `^0.9.10`. Formatting is handled by Prettier at `^3.9.10` with `prettier-plugin-astro` and `prettier-plugin-tailwindcss`, and `format:check` runs `prettier --check .`.

The readme asks you to run the migration checks before submitting changes, and names the three commands:

sh
bun run check
bun run build
bun run format:check

The word migration is a hint about the project's context. Astro's client router and View Transitions changed shape between major versions, and a project built to demonstrate them has to keep pace with the framework's own changes. The presence of a `check` script, a build step and a format check, with Prettier plugins for both Astro files and Tailwind class ordering, is what a maintained example looks like when the framework it demonstrates is moving.

TypeScript is at `^6.0.3`, so the project is on the current TypeScript generation, and the package is an ESM module with the type set to module.

Deployment is a Vercel template, and the Vercel button is the entry point

The deploy section is unusually direct for an example project, and it reflects that the target audience is a developer who wants to see the effect in a browser within a minute.

You can deploy the example using the Vercel Template, which is linked to the Vercel template for Astro view transitions, or see the live demo at spotify-astro-transitions.vercel.app. The readme also embeds a Deploy with Vercel button whose query points at the repository URL.

So the deployment path is: fork or clone the repository, click the button, and get a deployed instance. There is no environment variable to configure, no database and no external service, which is what you would expect from a front end demonstration.

That simplicity is a design choice with a consequence. There is no backend in this repository, so the interface is populated with something that is not described in the visible documentation, whether that is static data in the source tree or a mock API. The `public/` directory at the root is where static assets would live, and the `src/` directory holds the pages, layouts and components, but the readme does not describe where the playlist data comes from or whether any of it is fetched at build time.

For a reader evaluating the transition behaviour, that gap does not matter much, because what is being demonstrated is the navigation. For anyone considering reusing the interface for a real product, it matters a great deal, since the interesting part of a Spotify clone is the data and the audio, and neither is here.

The dependency on Tailwind and Svelte is also worth noting for reuse. Svelte components inside Astro give you interactive islands, which is the usual reason to reach for a component framework in an Astro site, and the icon set is assembled through `astro-icon` from four separate Iconify packages.

What this repository can and cannot teach you

There are three limits, and the third one is the reason to be careful with the licence and the branding.

The first is scope. This is a front end demonstration of a routing and animation feature. There is no backend, no authentication, no audio playback and no data model. A reader who copies it gets a page transition system and a set of pages, and nothing else.

The second is the framework coupling. The client router is an Astro feature, and the value of the example decays the moment you leave Astro. A team on a different stack, or on a different rendering strategy within Astro, gets the ideas and none of the code, and the ideas are documented by Astro itself.

The third is the interface it copies. Spotify's design is a trademarked and recognisable thing, and this repository reproduces it as a demonstration. The repository records no licence identifier in its package metadata, so the licence file is the thing to read before forking the transition setup, and in any case no open source licence grants rights to Spotify's brand or their assets, so a commercial project should not ship this interface as-is. The screenshots in the readme are the same point: the visual result is deliberately the famous one, which is what makes the demo legible and what makes it a poor starting point for your own product.

The honest summary is that this is a well built, current, small reference implementation that does one thing and explains its one interesting decision. Read it for the transition setup and the fallback reasoning. Do not read it as an architecture for a music product, and do not ship the interface without replacing it.

Editorial conclusion

spotify-astro-transitions fits a front end developer who wants to see Astro's client router and View Transitions applied to a real interface with a lot of pages, and who wants a reference for how the transition directives, the router and the fallback behave together. It is the wrong choice as a starting point for a music product, since it is a demonstration of one framework feature and carries no backend, no audio and no licensing from the service whose interface it copies. Before you build on it, verify two things: that the `fallback="none"` decision matches what you want for browsers without native support, since the readme states the intent that older browsers still load the page but without animation, and whether Astro's client router suits your routing needs, because a router that intercepts navigation changes how your scripts and loaders behave. The repository records no licence identifier in its metadata, the last push was on 2026-10-17, and the repository publishes no releases, so check the licence file before reusing the code in a product.

Frequently asked questions

What is spotify-astro-transitions?

It is a Spotify-inspired interface built to demonstrate Astro's client router and View Transitions for fluid navigation, with Tailwind CSS and Svelte. The project is an example of one framework feature rather than a music service, and it has a live demo at spotify-astro-transitions.vercel.app.

What does the client router do in Astro?

It intercepts navigation, fetches the next page and swaps its content in while preserving the shared parts of the layout, which is what lets the browser animate between the old and new DOM states. Without it, a navigation is a full document load and no transition is possible.

Why does spotify-astro-transitions set fallback="none"?

Because the project intentionally configures Astro's client router with `fallback="none"`, so older browsers still load the page but use full-page navigation without animation. The readme presents this as a deliberate choice rather than a limitation, and notes that native same-document View Transitions are supported in Chrome and Edge 111+, Firefox 144+, and Safari and iOS 18+.

How do I run spotify-astro-transitions locally?

Node.js 22.22 or newer and Bun are required. Run `bun install` and then `bun run dev`, which maps to `astro dev`. Before submitting changes the readme asks you to run `bun run check`, `bun run build` and `bun run format:check`.

What framework versions does spotify-astro-transitions use?

Astro at `^7.4.0` with the Svelte integration at `@astrojs/svelte` `^9.1.0` and Svelte at `^5.57.2`, Tailwind CSS at `^4.3.3` with `@tailwindcss/vite`, and TypeScript at `^6.0.3`. The package requires Node `>=22.22.0`.

Official sources

  1. igorm84/spotify-astro-transitions on GitHub
  2. Issues
  3. Project website
  4. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/igorm84-spotify-astro-transitions.svg)](https://hysenlabs.com/projects/igorm84-spotify-astro-transitions)

Was this useful?