r/Blazor 6m ago

Is there a Blazor static SSR equivalent of HTMX hx-indicator?

Upvotes

I have a Blazor static SSR form that kicks off a server-side calculation that takes ~3–5 seconds and occasionally more. I originally switched to Interactive Server mostly so I could show a spinner immediately after clicking Submit.

I implemented the same thing with HTMX and minimal API using hx-indicator, and it works great without needing a persistent connection.

Is there a similarly clean way to do this with static SSR? Basically just looking for a simple "Computing in progress..." indicator without needing SignalR or writing custom JS.


r/Blazor 17h ago

Page loading state when database call is carried out on - setParamsAsync

1 Upvotes

Blazor beginner here…

Coming from react when I carry out an Async call I usually render the component/page with a Loading spinner and once the api call has completed then the useEffect will make the component rerender with the hydrated info.

I am using Blazor (server rendered) and trying to show a page with a loading spinner until the database query has completed (async), the query depends on a reference parameter in the query string and it uses that to look up the required info from the DB and returns an object (or null), once the call finishes i set loading = false which should then show the info received if the item exists.

Generally all that works fine but I am finding when I am navigating to this page (from a page which asks for a reference in an input box which then navigates to this page and appends the query string reference),
I can see the url change in the browser when navigating but the original content is still shown for say 2-3 seconds before the component then shows the loading screen and then a second or so then shows the content retrieved from the database.

Why isn’t it showing the loading screen immediately and then once the db call finishes then show the details, it’s like is it blocking the thread from rendering the new page.

It may be difficult to understand this with no code but on mobile and just thought I would ask to see if anyone has solved this before?

I am using SetParametersAsync() and setting the loading priority to true as a default value in the page model and then calling the db call awaiting it in the set params async override method, then also loading = false just after the db call.

Just to give you more info, I set pre-rendering to false and it seems to behave as I would expect, but don’t really understand why.

Thanks in advance


r/Blazor 14h ago

I got tired of writing APIs just because my Blazor component moved to WASM, so I built RemoteService.Net

0 Upvotes

One thing that has always bothered me with Blazor Web Apps is calling server-side services when using different render modes.
During prerendering, your component runs on the server and can just call the service directly.
Then the same component runs in WebAssembly and suddenly you need an HTTP API, HttpClient, DTOs, serialization, error handling, etc.
But from the component’s point of view, I really don’t think it should matter where it’s currently running.
So I built RemoteService.Net.
You define a normal service interface:
public interface IOrderService : IRemoteService
{
Task<Order> GetAsync(int id);
}
Implement it normally on the server:
public class OrderService : IOrderService
{
public Task<Order> GetAsync(int id)
{
// ...
}
}
And then just inject it into your Blazor component:
@inject IOrderService Orders
and call:
var order = await Orders.GetAsync(42);
That’s it.
If the component is running on the server, RemoteService.Net calls OrderService directly in-process.
If it’s running in WebAssembly, it automatically uses a generated HTTP proxy instead.
The default generated endpoint would be:
POST /_rpc/IOrderService/GetAsync
Both the HTTP client proxy and the Minimal API endpoints are generated at compile time using source generators.
So the idea is basically:
Your Blazor components shouldn’t have to care which render mode they’re currently running in.
It works with Interactive Server, WebAssembly and Interactive Auto, including the transition from server prerendering to WASM.
I’ve also added things like authorization, typed exceptions across the HTTP boundary, CancellationToken support, compile-time diagnostics and a Mediator/CQRS API.
It’s still a new project and I’d love feedback, especially from people using Interactive Auto or WASM in real applications.
What do you think about this approach? Anything you’d want a library like this to handle?
GitHub:
https://github.com/matengo/RemoteService.Net


r/Blazor 2d ago

Blazor Ramp - Get Inline for Border Control

0 Upvotes

In my last post I revealed a simple Theming tool on the Blazor Ramp documentation site for the primary colour and explained that I would continue to do some more work on the Theming side of things, as well as to provide better component usage examples before making more components.

For those new to my component library, everything is driven from CSS custom properties, AKA variables. There are no component class parameters; however, every part of every component can be altered if need be, due to the hierarchy of these variables. In order to make this simpler for you, I started to create some theming tools that let you see live changes and then copy the variables for your stylesheet.

I have now finished work on a Theming Border Tool, which allows you to control the border radii on all of the components (as well as items used on the site). There are 7 categories of border groupings, with a total of 11 border types that you can control and output the variables for.

The Theme Border Tool and all of the groupings can be found on the Theming Sandbox page, which is also the place that gives you access to copying all of the variables to the clipboard via the "View & get theme variables" button. However, each border group also has an information Toggletip that shows the current live value for its associated border type.

Rather than try to cram every component onto the page next to the border control sliders, I reversed this and have added the border tools applicable to the components on every component usage page. As every slider is live, once you change it on one page, that change is everywhere. Currently, I am not storing your preferences, so any changes will not persist between site visits; the tools are merely to allow you to see the changes live and then copy the variables for your own usage.

The documentation site uses the default border radii of the published components; the only non default variable setting is the primary colour values used for the colours, which I change every few weeks, as it's only a matter of changing a single variable to change the look of the entire site.

In order for you to better see the changes, I have changed, and am currently changing, all of my sitewide CSS classes so they also belong to the component border groupings. Given this, I have also started work on a new NuGet package called BlazorRamp.CssClasses, so all the classes that I create and use for the site will be made available to you.

As the name suggests, this package will be a library of CSS classes that use the same underlying Core CSS variables and groupings as the components, so if you say use the Button class, it uses the same styles/variables as the buttons used inside any of the components, etc. Changing one variable affects all buttons, components or otherwise. I will not be making components that are merely wrappers around things like a button component or card component, unless there is good reason to do so, so for such things as these I will stick to plain old CSS and make these available instead.

As this is Blazor and .NET, rather than just give you the classes, each BEM (another topic for another day) class will have an associated .NET object, so rather than using strings, you can use object properties and methods to set the CSS class information. For example, I have a Section class that is primarily for site content, so rather than just use strings in the class attribute, you would do something like: class="@Section.Base @Section.Bordered @Section.Radius(SectionRadius.Content)", which in this instance would create a content area that has visible borders with a radius associated with the Content border radius grouping.

I used the term visible borders; the reason for this is that a border radius affects the border irrespective of whether you see it as a line around the element. This radius also affects the CSS outline property, and given Blazor Ramp is an accessibility-first component library, I make heavy use of the outline property for focus indicators. So even if you do not see a border change whilst using a mouse, switch to using a keyboard and you will see them, due to using :focus-visible.

Regarding the CSS Classes NuGet, I will most likely release something in the next few days with the Section class and a couple of others, and then just publish each time I add a new class and associated object, etc.

With regards to Theming colours, there is a lot I could do, and I will most likely at some stage make the Colour Theming tool more like the border one, drilling down into certain parts of each component. This is a little more complex, though, given that I would also need to display all of the contrast ratios, as I currently do on the Theming Accessibility page, so you can ensure everything still passes, etc.

That's it for this posting, as I need to get back to work on the CSS project, and if I'm lucky, just maybe I will take an hour off, given it's a bank holiday here in the UK.

Enjoy the rest of your day - Paul

You can go and mess with the borders on my documentation site, which is just WASM hosted on GitHub Pages, but as mentioned, the appropriate tools are also on each component's usage page: https://docs.blazorramp.uk/theming/sandbox

GitHub repo: https://github.com/BlazorRamp/Components


r/Blazor 2d ago

Building a Blazor web application using the BFF (backend for frontend) pattern with .NET 10 where the application would render using Interactive Webassembly specifically for mobile device users and render using Interactive Server for desktop machine users. Has anyone used this approach? If so, what

7 Upvotes

...issues/hurdles did you run into? Is there anything that I should be concerned about?

Some additional detail:

- authentication via Entra ID via the main project

- Main project would manage data access/business logic, as well as desktop only components.

- Client project contains mobile only components.

- Shared project contains components used in both.

The application has some mobile device specific functionality (tracking GPS location, camera access), while the desktop side has some admin specific functionality, but the core functionality (data entry) would be applicable to both. The idea here is to take the best of both Blazor Server (fast load times, secure) and Blazor WASM (functional without persistent connection, relatively light weight).


r/Blazor 3d ago

Augmented Dotnet Watch Task - Agent Awareness

0 Upvotes

I hacked together a nifty tool because i got tired of Claude Code flooding my watch task with file changes. His file modifications are unfortunately precisely spaced to trigger 27 rebuilds per minute, overheating my laptop and starting a fire in my parents garage.

What if i made the watch task agent aware, tailing the Claude output, waiting for him to finish his work before triggering the reload? I hacked together some proof of concept and it's already working nicely.

Unfortunately i cant do the fancier partial binary updates like the official watch tool, but i think the idea is something really useful. I'm sure others can do a much better implementation or improve the idea but I wanted to share a crude first draft. Cheers!

https://github.com/crs-sys/claude-blazor-watchtask


r/Blazor 4d ago

K7 – media server UI in Blazor WASM + MAUI (same codebase)

Post image
51 Upvotes

I recently shipped the first version of K7, a self-hosted media server. The whole client UI is Blazor, WASM for the web, MAUI + Blazor for Android / Windows (iOS/Mac builds exist but I don't have Apple hardware to test).

Repo: https://github.com/kaybi-gh/K7

Demo: https://k7.kaybi.dev (guest login only)

Backend is .NET 10 (Clean Architecture, MediatR, EF Core, Postgres). The interesting Blazor bits for me were:

- one UI shared across web + native hosts

- spatial / full keyboard navigation (TV remote friendly)

- media playback + Chromecast from the web/Android clients

- keeping the SPA usable as a "real" app, not just CRUD forms

Happy to answer questions about the Blazor / MAUI setup, WASM pitfalls, or how the shared UI project is structured.

Optimization on low-end devices like TVs is a real concern when developing with Blazor Hybrid, has anyone else hit the same pain points?


r/Blazor 4d ago

Blazor alternative?

0 Upvotes

Dioxus - Rust based cross-platform framework

In my view, the problem with Blazor is that you need to have "server features" for a client-facing app, since Blazor WASM alone won't cut it.

With Dioxus you can create a WASM application with a much smaller footprint, since there's no bundled framework to ship together with your app like the .NET CLR. Your source code is compiled to WASM directly - there's no Rust runtime since it's a language closer to C and C++.

I think this is a great advantage for creating WASM based SPA's - no need to download a large binary for your app to run - just your app's code.


r/Blazor 8d ago

ASP.NET Web Forms to Blazor Migration Guide

Thumbnail
faciletechnolab.com
0 Upvotes

r/Blazor 9d ago

Blazor App Examples

25 Upvotes

I found a site that is a showcase of Blazor apps. It looks like they need people to submit examples which I am going to do once I complete mine. If anyone is interested...

https://www.builtusingblazor.com


r/Blazor 12d ago

MAUI Blazor Hybrid + Web App in 2026 — Is it actually a good choice?

5 Upvotes

Hey everyone,

I’m currently looking into MAUI Blazor Hybrid for a project and honestly a bit confused about whether it’s a good idea long term.

The main reason I’m considering it is that we already use Blazor, so being able to reuse the same UI/components for the web app and a MAUI mobile/desktop app sounds pretty nice.

But I keep seeing mixed opinions about Blazor Hybrid, especially around performance, WebView issues, debugging, and how much code you can actually share in a real project.

For anyone who has used MAUI Blazor Hybrid in a production app — how has it been for you?

Would you use it again if you were starting the project today, or would you go with something else?

I’d especially like to hear about the things that caused problems after the initial development phase. Thanks in advance!


r/Blazor 12d ago

Commercial AI posts allowed?

0 Upvotes

Can i post here from post body generated by AI? Thanks in advance


r/Blazor 13d ago

How to manually add routes in blazor?

5 Upvotes

i have an applications with a bunch of plugins and sub assemblies that create pages.

We are migrating from WPF and creating some new features also.

These pages have characteristics that can be automated so importing the assembly to routing should not be done, because mainly some may even conflict.

So i would like to route them manually and i can add a route to any component, but not integrated in the app:

- add a page, it loads only the page

- add the layout, it does not load the page

- add the app says route not found

WebServer.MapGet("/lm", () => new RazorComponentResult<Page>());

WebServer.MapGet("/lm2", () => new RazorComponentResult<Layout>());

WebServer.MapGet("/lm3", () =>

{

RazorComponentResult rr = new RazorComponentResult<WebApp>();

return rr;

}

);


r/Blazor 13d ago

Meta Flowchart of MAUI hybrid web solution explorer Spoiler

Post image
4 Upvotes

r/Blazor 13d ago

Commercial Blazor MAUI hybrid web tutorials suggestion

2 Upvotes

Where can i learn about blazor maui hybrid web projects? I saw blazor maui hybrid web has many features like deploying same code on different platforms. thanks in advance


r/Blazor 15d ago

Blazor Ramp – Colour / Contrast & Theming – RFC

7 Upvotes

For those new to my posts: I'm the author of Blazor Ramp, an accessibility-first Blazor library. Every component released has been manually tested with the screen readers JAWS, NVDA and Narrator, paired with each of the following browsers: Edge, Chrome and Firefox. Also tested: VoiceOver on macOS paired with Safari, VoiceOver on iOS paired with Safari, and TalkBack on Android paired with Chrome, plus Voice Access, the voice control software built into Windows 11. Any screen reader quirk and/or issues are documented so you know exactly what to expect.

The release of the Data Table component last week completed what I'd class as the base set of components that make up the majority of LOB apps - at least the ones I've built over the years. I've more planned, but before I continue churning them out, I need, want to spend some time amending the documentation so it has better usage examples, more like the Data Table ones, making it easier for you to get up and running with your chosen components.

Alongside this, I also wanted to spend some time on the theming side of the documentation.

I've mentioned in the past that for a lot of sites, you may only need to change a single variable, and pointed out which one. On that note, I've just added a couple of pages to the Theming section of the documentation site that demonstrate this in real time, along with information on the accessibility page regarding colour contrast ratios.

Essentially, you can select your preferred colour and see all the changes live across every released component, along with contrast ratio information for the component parts that sit on the lightest and darkest shades - the ones most affected by contrast ratio changes. This information tells you whether the affected component parts are still WCAG compliant. If not, you'd simply assign a different value to the variable shown as failing in your stylesheet, etc.

It's probably easier for you to go and look at the page on the site than for me to explain it here.

I've also added a page called Sandbox in the Theming section (currently blank - I tend to deploy as I go along), which I'm about to start work on. The intention is to add a few things in there so you can adjust certain aspects, view the changes live, and then export/paste them directly into your stylesheet with no further changes necessary.

The reason for this post is to try to get some feedback, mainly regarding the accessibility side of things, so I can offer more help and advice on my sites - I know this topic is quite tough, confusing and/or just a pain for most people.

A few questions for you:

  • Are there more tools like what I've just added to the Colour and Accessibility pages in the Theming section that would help you?
  • As I'll be doing more work on the usage pages, would you like more guidance on the accessibility of each component - for example, links to best practices, WCAG guidelines, etc.? If so, what specifically?
  • Finally, which other accessibility-first components and/or features would you like to see sooner rather than later?

I have two sites: one I call the test site, geared more towards anyone who wants to try things out with their chosen AT device, and the documentation site, which has all the information and usage examples. Both are just WASM hosted on GitHub Pages.

Test site: https://blazorramp.uk

Doc site: https://docs.blazorramp.uk/theming/colours (what's discussed above; the contrast information is on the Accessibility page within the Theming section)

Repo: https://github.com/BlazorRamp/Components

Please comment and let me know your thoughts. Thanks.

Paul


r/Blazor 15d ago

Update to my media manager app from a while back...

4 Upvotes

Finally got around to making a video on the features/functionality of it... welcome any comments, even the snarky ones. Probably 70% complete, still a ways to go.

Tuvima Library:

https://www.youtube.com/watch?v=pkh2U9JGchY&pp=ygUOdHV2aW1hIGxpYnJhcnk%3D


r/Blazor 16d ago

Custom Minimize/Maximize/Close Buttons in Blazor Hybrid?

3 Upvotes

Hello guys,

so I am kinda new to Blazor and I want to know, if it is possible, to have custom minimize / maximize and close buttons? I am building a simple HMI for my PLC that can be operated by using the build in touchscreen. I removed the top Windowsbar, so that the application is using the whole screen. Sometimes I need to get behind the HMI, so I now have a small window with the Minimize/Maximize/Close Buttons but I cant find a simple method for blazor hybrid. Is there some NuGet package or do I need a workaround where I control the window size?


r/Blazor 18d ago

Meta Is there a way to write a Blazor app without wasm that doesn’t require server round trip for things like drop-down menus?

5 Upvotes

Situation is we want to embed an app somewhere that doesn’t support wasm, but we also don’t want to have to involve the server for simple things like drop-down menus

Is this just not possible with blazor?


r/Blazor 18d ago

[Python/JS/C#] Block Engine: Run Python, Node.js, Lua & PHP in one file

Thumbnail block-io.blockengine.workers.dev
0 Upvotes

r/Blazor 19d ago

Commercial BlazorGraphs 3.0 is now available!

43 Upvotes

Hello everyone, after a lot of work, I'm happy to announce the release of the new version 3.0 of BlazorGraphs. As mentioned in the previous post, I've tried to include in this major release a series of breaking changes I had in mind, as well as others recommended directly by you.

I've mainly merged the namespaces, renamed some components, added new ones, and redone the linecharts (as you can see in the gif). You also have more freedom in choosing colors. Without boring you with a list of all the changes, you can view the changelog directly on the website or in the Git repository.

I know you wanted the site with the live demo and the best-looking tooltips; don't worry, I'll take care of that as soon as possible.

I'm available for any clarification; just ask here in the comments.

I hope you like this new version, hello everyone.

Usefull links:


r/Blazor 19d ago

Meta C# .NET MAUI Hybrid: Solution Explorer Spoiler

0 Upvotes

If starting with C# .NET MAUI Hybrid / Blazor Hybrid, the Solution Explorer is always confusing.

What is a project? What is Platforms? Why are there .razor, .cs, .xaml, and .wwwroot folders? What does Shared mean?

Let's break it down in simple terms. 🚀


r/Blazor 19d ago

Commercial PhotinoX.Blazor 5.0.0 is out - Blazor desktop apps on native WebViews

9 Upvotes

PhotinoX.Blazor is an independent fork and continuation of Photino.Blazor for building lightweight cross-platform desktop apps with Blazor and OS-native WebViews:

  • Linux: WebKitGTK 4.1
  • macOS: WKWebView
  • Windows: WebView2

The 5.0 release is a major update across the PhotinoX stack. PhotinoX has moved from the older window-oriented model to an explicit application-oriented model built around PhotinoApplication, PhotinoDispatcher, and PhotinoWindow.

For Blazor apps, this means:

  • explicit application/window separation;
  • PhotinoBlazorApp owns shared services and application lifetime;
  • PhotinoBlazorWindow owns per-window Blazor hosting state;
  • better multi-window support with isolated root components, WebView manager state, dispatcher/synchronization context, and resource handling;
  • unified app custom scheme on Windows, macOS, and Linux;
  • BlazorWebView-style UrlLoading support for top-level navigation;
  • handling for external links, target="_blank", and window.open(...);
  • new native/window lifecycle events from PhotinoX (navigation and content loading);
  • application-level notifications and shutdown/lifecycle handling;
  • Target frameworks: net8.0, net9.0, and net10.0.

NuGet: https://www.nuget.org/packages/PhotinoX.Blazor/5.0.0

GitHub: https://github.com/ivanvoyager/PhotinoX.Blazor

Core PhotinoX repo: https://github.com/ivanvoyager/PhotinoX

Feedback, issues, and real-world use cases are welcome.


r/Blazor 20d ago

Commercial Blazorise 2.3 released

22 Upvotes

Hello everyone,

Blazorise 2.3 is out.

For those who don't know it, Blazorise is a UI component library for Blazor that works with Bootstrap, Tailwind, Fluent UI, Material, and other CSS frameworks.

Initially, this release was supposed to be fairly small. If anyone remembers, in one of my previous posts I asked whether it makes more sense to have smaller releases with faster cycles, or bigger releases with slower cycles.

I wanted the faster release cycle.

Yeah... didn't quite go as planned.

I wanted to build a Reporting component. But once I started working on the report designer, I found that we were missing several things in the framework.

Instead of building them only for Reporting, we made them standalone components. That's how we ended up with DockLayout, ContextMenu, PropertyGrid, and a new PDF generation extension.

We also added CodeEditor and Resizer, Gantt milestones and weekly timelines, Scheduler improvements, and completely rebuilt DatePicker and TimePicker with Blazor and C#, removing the Flatpickr dependency.

So yeah, it turned into a much bigger release than originally planned.

Release notes: https://blazorise.com/news/release-notes/230

If you use Blazor, I'd be interested to hear what you think, especially about Reporting and CodeEditor.

PS. The default Reddit post editor is really bad. I hate it. PPS. Post edited with Grammarly because reasons.


r/Blazor 20d ago

The best Markdown editor for Blazor Server?

7 Upvotes

Which Markdown editor/previewer are you guys using for Blazor server? We need to implement markdown-formatted notes along with an editor for them in a blazor server app.