Elegua screenshot

Elegua

Author Avatar Theme by Howesteve
Updated: 3 Mar 2024
83 Stars

Elegua - a small, reactive PWA router for Svelte

Categories

Overview

Elegua is a lightweight and intuitive micro client router designed for Svelte applications, making it an excellent choice for developers seeking simplicity and flexibility. With its minimalistic approach, Elegua eliminates the need for traditional components, allowing users to manage routing using Svelte’s logical blocks. This enables a more natural and seamless integration into Svelte projects, making it a standout option among existing routers.

This router emphasizes a dependency-free setup, leveraging only the Svelte framework. Its small footprint, combined with a fully reactive design, ensures that changes in the application state are reflected in the browser’s URL, and vice versa. If you’re looking for a straightforward solution to implement routing without the bloat, Elegua might just be what you need.

Features

  • Dependency Free: Elegua requires no additional dependencies other than Svelte, making it easy to integrate and lightweight.
  • Intuitive API: The design feels natural for developers, utilizing plain Svelte logical blocks for routing instead of complex components.
  • Minimalist Design: Everything you need comes in a single file, compact at 2.2KB gzipped, allowing for faster load times.
  • Tree-shakable: The router can become even smaller based on the features you utilize, optimizing your bundle size.
  • Fully Reactive: Changes to the application state are immediately reflected in the browser’s URL, ensuring a seamless user experience.
  • Dynamic and Fixed Routing: Support for fixed path routes, variable routes, and regular expression routes provides versatility for complex routing needs.
  • Prevent Route Changes: Unique functions like preventUnload() and preventChange() allow you to manage route transitions under specific conditions.
  • Fast Performance: Elegua’s approach to routing is designed for speed, avoiding the overhead of additional components and complex logic.