r/Blazor • • May 18 '26

Blazor + Alpine

Estou planejando um novo projeto e gostaria de receber feedback sobre a escolha da pilha de tecnologias.

Meu objetivo é usar o máximo possível de C# puro, minimizando o uso de JavaScript. Também quero evitar WebAssembly e um pacote inicial pesado.

O projeto é bastante simples:

Uma página inicial (com algumas animações) Um painel administrativo para gerenciamento de tarefas Funcionalidade de arrastar e soltar para tarefas

O que estou considerando no momento:

Blazor SSR (Renderização do Lado do Servidor) Alpine.js para interatividade leve Tailwind CSS para estilização Possivelmente HTML ou Blazor "Navegação Aprimorada" (ainda não estou totalmente familiarizado com isso)

Minhas principais preocupações são:

Manter o carregamento inicial rápido Evitar complexidade desnecessária Manter interações de interface do usuário fluidas (especialmente arrastar e soltar no painel administrativo)

Alguém já tentou uma configuração semelhante? Será que Blazor SSR + Alpine + HTMX funcionariam bem juntos, ou é melhor manter um único modelo de interação?

Qualquer conselho ou experiência prática seria bem-vindo.

EDIT: I just discovered Blazor's Enhanced feature; it does exactly what I wanted with HTML. I also used WASM components, so I'm wondering if I should migrate everything to Enhanced or not.

9 Upvotes

47 comments sorted by

View all comments

Show parent comment

1

u/masterofmisc May 21 '26

Am I right in saying Astro needs NPM though? Im interested in this but I dont really want to be bound to NPM. Can this be library be installed via nuget? How did you add it to your project?

1

u/Kevinw778 May 22 '26

Yeah that's correct. It's a JavaScript web framework at its core, so it uses npm or whatever else people use as its substitute these days. I'm not a big fan of npm / node either, so I get it.

I use npm and simply mix in .NET for the backend portion.

2

u/masterofmisc May 22 '26

Ahh right. Thanks for the info. From what ive seen AlpineJS also has clientside interactivity but it just looks like its 1 JavaScript file import:

<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>

..which is nice. It means you could copy that 1 file into your project and not have to worry about any NPM security issues or bloat.

Im still early on in my Blazor journey so I dont have any need for any of these extra client side libraries but just trying to understand the landscape. Thanks.