A highly declarative, tiny, dependency-free router for Svelte web applications.
tinro is a minimalist, dependency-free client-side router specifically designed for Svelte applications. It provides essential routing features through a single declarative component, focusing on simplicity and a small bundle size while using standard HTML links for navigation.
Svelte developers building single-page applications (SPAs) who prioritize minimalism, lightweight bundles, and a declarative, component-based routing syntax.
Developers choose tinro for its extreme simplicity, zero dependencies, and tiny footprint, offering a clean, declarative API that leverages Svelte's native capabilities rather than adding complex abstractions.
Highly declarative, tiny, dependency free router for Svelte's web applications.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
tinro is dependency-free and extremely lightweight, with a bundle size under 2KB gzipped as shown in the README's bundlephobia badge, making it ideal for performance-sensitive applications.
Uses a single <Route> component for defining routes with clean nesting, as demonstrated in the getting started example, reducing boilerplate and aligning with Svelte's component-based philosophy.
Relies on standard <a> elements for navigation, enhancing accessibility and simplicity, with optional active state management via an action provided in the package.
Supports History API, hash-based, and in-memory navigation methods out of the box, allowing adaptation to different deployment scenarios without changing route definitions.
Advanced functionality like lazy loading, transitions, and guarded routes requires manual implementation using recipes from the README, adding development overhead for common SPA needs.
For History API mode, server-side setup (e.g., using sirv with --single flag) is necessary to handle deep links, which can be a hurdle for beginners or specific hosting environments.
The README mentions deprecated APIs like params, indicating potential breaking changes, and as a minimalist project, it lacks the extensive community plugins and integrations of larger routers.