A JavaScript interop library for Blazor that detects browser window size and media queries at runtime.
BlazorSize is a JavaScript interop library for Blazor that provides runtime detection of browser window size and media queries. It solves the problem of implementing adaptive rendering in Blazor applications by allowing developers to programmatically respond to screen size changes and device characteristics. The library complements CSS media queries with programmatic workflows for more dynamic responsive behaviors.
Blazor developers building responsive web applications that need to adapt their UI based on screen size or device characteristics at runtime. It's particularly useful for those implementing mobile/desktop rendering changes without relying on a full component library.
Developers choose BlazorSize because it provides a lightweight, focused solution for browser size detection and media query testing without the overhead of a complete UI framework. It offers simple JavaScript interop specifically designed for Blazor's component model, making it easy to integrate adaptive rendering into existing applications.
Blazor browser size interop for matchMedia and browser window size at runtime.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
BlazorSize is designed as a simple library without requiring a full component framework, making it easy to add adaptive rendering to Blazor apps without overhead.
It allows Razor Components to handle mobile/desktop changes at runtime by detecting browser size and testing media queries programmatically, as highlighted in the README.
Built specifically for Blazor, it provides efficient interop for browser size detection and change monitoring, enabling seamless integration with Blazor's component model.
Extends CSS media queries with programmatic logic, enabling more complex adaptive behaviors in Blazor components, as mentioned in the README's philosophy.
Documentation is hosted in the GitHub Wiki, which might be less comprehensive or up-to-date compared to official documentation sites, as noted in the README.
As a JavaScript interop library, it requires JavaScript to be enabled, limiting its use in environments with JS restrictions or for server-side rendering without client-side scripts.
If using Telerik UI for Blazor, the built-in TelerikMediaQuery component makes BlazorSize unnecessary, as acknowledged in the README, leading to potential vendor lock-in or duplication.
Focused solely on size detection and media queries, it lacks broader responsive design features like touch gesture handling or device orientation support, which might require additional libraries.
BlazorSize is an open-source alternative to the following products: