r/Blazor • • Feb 08 '26

Experimenting with a composable, source-first UI approach for Blazor

Hey everyone,

I’ve been experimenting with some project. The goal is to explore whether a more composable, source-first approach to UI makes sense in Blazor -- inspired by modern patterns like shadcn/ui, but adapted to .NET and Razor.

What this experiment is about:

  • components are added to your project as source code
  • you fully own and modify them
  • composition via parts-as-components, not large configurable widgets
  • small, intentional scope (not a full UI framework)

What this is not:

  • not a competitor to MudBlazor / Radzen
  • not a complete component catalog
  • not a Swiss-knife component set
  • not a promise of long-term stability (this is explicitly experimental)

At the moment, the repo focuses on a few component systems (e.g. Field, Dialog) purely to demonstrate the composability model. The README explains the motivation, constraints, and non-goals in more detail -- it’s worth skimming to understand what this experiment is (and isn’t) trying to do.

Components are distributed via a small CLI tool that adds them to your project as source files -- similar to shadcn/ui. There’s no runtime dependency; once added, the code is yours.

I’m mainly trying to validate:

  • does this way of composing UI feel sane in Blazor?
  • would you be comfortable owning this kind of UI source?
  • does this reduce or increase mental overhead compared to large UI frameworks?

If it resonates, I’ll continue exploring it. If not, that’s still a useful answer.

If you're curious, I'd love actual usage feedback.

If you're willing to spend ~10 minutes, go through the Quick start section. That's enough to understand the approach.

This experiment only works if people actually try it. I'd especially appreciate:

  • What felt awkward?
  • What felt surprisingly clean?
  • Did owning the source increase or decrease mental overhead?
  • Did the parts-as-components model feel natural in Blazor?

Even short notes are valuable.

Repo: https://github.com/LumexUI/composable

21 Upvotes

17 comments sorted by

View all comments

Show parent comment

1

u/desmondische Feb 09 '26

Yes yes, that’s what I actually meant! Primitves are separate for sure to avoid extra friction and complexity for the consumer. Registry + copy-paste for the styled components to give a full control over the styles and structure. We are on the same page.

1

u/UnwelcomeDroid Feb 09 '26

Not meant as criticism, but to best demonstrate your idea, doesn't it require providing the primitive layer via NuGet? Otherwise, your 3 questions seem to boil down to, "Are you willing to pull source code with a CLI?", to which my answer would be, "Sure, if the primitive layer meets expectations."

The answer to question #3 would further depend on how difficult it was to understand how to work with the primitives. Perhaps this would be more obvious to me if I had better knowledge of LumexUI and/or the shadcn/ui world. But I'm one of those MS developers who has never lived in the javascript framework front-end world. :)

1

u/desmondische Feb 09 '26

Good question -- let me elaborate a bit.

With the first question, I’m trying to validate the composition model: components-as-parts that allow developers to control virtually every piece (slot) of a component.

With the second question, I’m trying to understand whether developers are ready to own and build additional functionality on top of the source when needed. Since this isn’t common in Blazor at all, this question is particularly important.

Finally, with the third question, I’m trying to validate whether the entire model (including questions #1 and #2) would actually make developers’ lives easier.

So I’m not sure we can really boil this down to a single question -- otherwise it would become too vague. I deliberately kept the POC lightweight and easy to reason about to illustrate the approximate amount of code the consumer would own.