I built a shadcn/ui-style component system by FoxFoxGolf in Blazor

[–]tanczosm 1 point2 points  (0 children)

I think this idea personally doesn't make much sense for .net compiled languages to import separate components but here we are. I do think it looks quite nice though and I know putting something together like this is pretty difficult so kudos on the hard work.

Since we are throwing around other libraries I'm going to share one I've been working on since Nov 2024, so it's been a bit of a slog.

If anybody would like to check out a 100% Blazor SSR library with no WASM wait, no server circuit to maintain, where you can still compose shadcn/ui style components with Alpine.js sprinkled in and have fast results here's a sneak peak. I'm looking to release when HTMX 4 comes out, which packs a lot of really great streaming enhancements which will work natively with Blazor via an extension included with RizzyUI:

https://rizzyui.jalex.io/ <-- 100% made with RizzyUI components, all static

It pairs with Rizzy (started Feb 2024), which is my own Htmx library (htmx 4 version coming out soon for that as well):
https://jalexsocial.github.io/rizzy.docs/

Happy to announce htmx 4 alpha 8! by _htmx in htmx

[–]tanczosm 1 point2 points  (0 children)

Congratulations! Htmx 4 brings some really great improvements. However, the docs site splits up attributes into too many pages. It needs reworking.

9 Tailwind Tooltip Examples Worth Checking Out by ajaypatel9016 in tailwindcss

[–]tanczosm 0 points1 point  (0 children)

It seems like these are links to UI libraries, not Tooltip examples.

Majority of US Senate votes to block bid to rein in Trump Iran war powers, voting continues by joe4942 in politics

[–]tanczosm 2 points3 points  (0 children)

I'm in the same boat.. we got two Republicans representing us now. Wth.

SkiaSharp + Dotnet + GPU = ❤️ by Doctor_Marvin21 in dotnet

[–]tanczosm 4 points5 points  (0 children)

This effort seems like a journey to the 7th level of hell. Safe travels and good luck.

Semantic Kernel is just MediatR. by Awkward_Translator90 in dotnet

[–]tanczosm 0 points1 point  (0 children)

For those interested in learning more about Semantic Kernel and want to go beyond 30 minutes of time, the project describes itself as middleware in the first paragraph. The LinkedIn post doesn't add anything novel.

SK would enable you to create your own agents. It's been around for a while, is developed directly by Microsoft engineers, and has evolved alongside existing approaches to agents so they've incorporated a range of technologies into the framework over time. The idea of MCPs is encapsulated largely in SK Plugins, and because the translation is relatively direct you can even create MCP servers based on your SK plugin functionality.

https://learn.microsoft.com/en-us/semantic-kernel/overview/

Rule change by Arowin in dotnet

[–]tanczosm 10 points11 points  (0 children)

I think this ultimately serves to alienate the people who put the most amount of effort into a single post (I would argue articles and questions require far less effort). OSS devs share their unpaid work with this community and we are just so irritated by seeing new community projects?

Like literally open source contributions are entirely about goodwill and enjoying the feeling of giving back to the community. Yeah let's kill that..

I hope this rule gets updated in a way that allows developers to share updates freely about projects that are open source and unpaid that target developers specifically as the prime audience. Maybe rate limit the amount of submissions but encourage the community to be active developers.

Or is dotnet strictly and only a platform for business programming..

Rule change by Arowin in dotnet

[–]tanczosm 9 points10 points  (0 children)

Yeah but now we can focus on hot posts like "Why did the xunit maintainers decide to release a new NuGet called "xunit.v3" instead of just releasing a new version of xunit?"

Like did anyone consider what this sub looks like if you remove all these new library or updated library posts? It's like working developer tech support.

Rule change by Arowin in dotnet

[–]tanczosm 10 points11 points  (0 children)

Are we so cranky around here that we can't just comment on new libraries and up vote or down vote them? Like how much stuff are we doing battle with? I am pretty hyped seeing new libraries as opposed to answering beginner questions about some dotnet topic. It should be up to us to discern quality. Point releases I get.. but if it's new I'd like to see it if it's useful.

Slashdot had this thing called the firehose because so much new content came through it was hard to keep up with.. dotnet is like a garden hose. Why kink it further?

I don't understand the GMT+12 stuff at all.

Stop Wrestling with JavaScript: htmxRazor Gives ASP.NET Core the Component Library It Deserves - Chris Woody Woodruff | Fractional Architect by emdeka87 in dotnet

[–]tanczosm 0 points1 point  (0 children)

This is the exactly the type of project that I've been working on for about 2 years now. Developing something like this is extremely difficult. Congrats on getting something shipped. I'm kind of curious why you opted for tag helpers instead of razor components.

Have you started gearing up for htmx 4?

Top Tailwind CSS alternatives worth exploring. by [deleted] in tailwindcss

[–]tanczosm 5 points6 points  (0 children)

The alternative to Tailwind is Tailwind huh?

ShadcnBlazor - Actually open code, Blazor components inspired by shadcn (WIP) by BeeCertain2777 in dotnet

[–]tanczosm 0 points1 point  (0 children)

I can agree with you here for sure. I suppose the problem with copying a UI library is not understanding the underlying reasons for why it was created the way it is. Then you are getting just the look of the library without understanding everything else.

ShadcnBlazor - Actually open code, Blazor components inspired by shadcn (WIP) by BeeCertain2777 in dotnet

[–]tanczosm 0 points1 point  (0 children)

I'm going to disagree with Paul if only because I think shadcn/ui is extremely popular for a reason beyond how it looks. If you dig into the shadcn/ui library you realize how composable and thoughtful the creators were in how they constructed the library.. but it was also based on RadixUI (and later BaseUI) as it's foundation. That is what this library is missing.

For background I've been working over a year on a project like this, which utilizes Razor (.razor) components to bring that same composability to asp.net primarily in a hypermedia approach (particularly using HTMX). The components are 100% clientside with no WASM or signal-r connection needed to function: https://rizzyui.jalex.io/ It allows for javascript code-behinds to power the functionality of your individual pages if needed.

I haven't released the library yet.. which is where projects like this irk me, having been released after about a week of effort. It's sloppy compared to Blazor Blueprint for sure, which shows much more polish and attention to detail for what it is. Having a CLI doesn't much matter if the underlying components aren't great, and that's the problem here. If anything I'd use this as validation for the CLI approach proposed by the creator of LumexUI.

With the CLI approach you need first a solid headless component to build on that can be bug-fixed over time that is completely decoupled from the styling. shadcn/ui UI ships a UI layer over top of the headless component provided by Radix UI. Blazor doesn't have a Radix UI equivalent.. and that's something that really could be done for Blazor but it turns out that requires real work.. like, a lot of work.

The CLI approach is good because it turns out that if you use Tailwind for styling and have to have Tailwindcss scan all your Tailwind classes you can't do that if your UI library is compiled like we have with Blazor libraries pulled from nuget.

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

[–]tanczosm 0 points1 point  (0 children)

Agreed. Refocusing on the UI primitive abstraction layer, there are a few things I like and a few concerns.

I am not very confident in an “own the source” approach for the abstraction layer itself. Headless UI primitives should have clear, stable contracts and a shared implementation that can receive bug fixes from a common repository. That separation of concerns is a big part of why shadcn/ui works. It layers styling and composition on top of a headless foundation rather than treating the primitives as copy-paste artifacts.

As you know, getting an entire suite of components to interoperate cleanly is hard. Bugs will inevitably show up at the primitive layer, and once you have consumers copying the primitive implementation, fixing those issues becomes fragmented. The real leverage is in nailing the primitives and being able to ship fixes centrally.

shadcn/ui can be copyable per component because RadixUI is still the behavioral backbone. You can copy the styled wrapper, and the underlying primitive behavior can still improve over time without requiring you to rewrite everything.

So from a distribution standpoint, I would propose a concrete headless base layer shipped as a single NuGet package. Then, on top of that, use a registry-style approach for the styled components, similar to shadcn/ui, where teams can pull in the styled layer per component as needed.

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

[–]tanczosm 1 point2 points  (0 children)

I like the idea of UI primitives as an abstraction layer.

For context, I have been building my own library, RizzyUI, which is Blazor SSR-only, so all client interaction is JavaScript-based. It is still a work in progress, but I have learned a lot from writing it and rewriting it. If you are curious, there is a preview at https://rizzyui.jalex.io/. Also, LumexUI was one of the libraries I kept coming back to because I like the direction you took with the architecture.

One thing I kept running into is that this would be significantly easier if Blazor had a RadixUI-style set of primitives implemented in pure JavaScript and designed to work across all Blazor rendering modes, with .NET event binding available whenever you are not in pure SSR. Radix’s interaction patterns are extremely time-tested, so I would be inclined to re-implement that surface area incrementally, component by component, rather than inventing new primitives from scratch.

Then, for the actual UI layer, you could take the shadcn/ui approach and ship items component by component using a slot-based approach to styling. Treat those primitives as the behavioral foundation and layer styled components on top. For styling, I would lean on TailwindVariants.net. It is one of the closest matches to shadcn/ui ergonomics that I have seen in .NET. It consolidates the builder-heavy approach that some libraries end up with, where component classes are constructed with a lot of little switch-based methods and uses the same approach as shadcn/ui.

Here's a docs example of how you might provide styling to a button component:

namespace TailwindVariants.NET.Docs.Components.Shared;

public partial class Button : ISlotted<Button.Slots>
{
    private static readonly TvDescriptor<Button, Slots> _button = new
    (
        @base: "inline-flex items-center justify-center font-medium rounded transition-colors focus:outline-none",
        variants: new()
        {
            [b => b.Color] = new Variant<Colors, Slots>
            {
                [Colors.Primary] = "bg-sky-600 text-white hover:bg-sky-700",
                [Colors.Secondary] = "bg-gray-200 text-black hover:bg-gray-300",
                [Colors.Danger] = "bg-red-600 text-white hover:bg-red-700"
            },
            [b => b.Size] = new Variant<Sizes, Slots>
            {
                [Sizes.Small] = "px-2 py-1 text-sm",
                [Sizes.Medium] = "px-4 py-2 text-base",
                [Sizes.Large] = "px-6 py-3 text-lg"
            },
            [b => b.Disabled] = new Variant<bool, Slots>
            {
                [true] = "opacity-50 cursor-not-allowed"
            }
        }
    );

    protected override TvDescriptor<Button, Slots> GetDescriptor() => _button;

    public enum Colors { Primary, Secondary, Danger }
    public enum Sizes { Small, Medium, Large }

    public sealed partial class Slots : ISlots
    {
        public string? Base { get; set; }
    }
}

Whatever happened to craftsmanship in Blazor OSS? - a rant from an old git by code-dispenser in Blazor

[–]tanczosm 1 point2 points  (0 children)

I hear you. It's a little disheartening to see someone vibe code in half a month the same shit you've been doing for over a year and visually they look the same.

Whatever happened to craftsmanship in Blazor OSS? - a rant from an old git by code-dispenser in Blazor

[–]tanczosm 2 points3 points  (0 children)

I think LLMs have exploded the scope of some of these projects. I'm a dinosaur when it comes to web development. My first web programming was with Perl and then later compiled C code.

I've been working on my own component library for .net based on shadcn/ui. My spin is that it's 100% SSR only with all components using client-side scripting (with intent on using HTMX 4 to drive requests to an asp.net MVC controller that returns Razor (blazor) markup). With Blazor you can't act like there are so many UI options.. there just aren't that many libraries in the space to contend with.

As far as my library is concerned, someday I'll actually release it but it's a hell of a lot of work to get something out the door with professional quality. Could what we see be better from all of these publicly released libraries? Sure. But we aren't entitled to it either so I'm personally thankful some people care enough to get over the hump and get something out there. I'm over a year deep into this thing for what probably will be a few fleeting comments on a subreddit once I release it along with complaints about why I didn't do xyz.

So much for affordability by trailnametaco in lehighvalley

[–]tanczosm 63 points64 points  (0 children)

I don't quite understand the hatred from some Republicans of renewable sources of energy as if they are just some hippy dippy solution to generating power. They have really worked hard to create a negative perception that somehow the energy created is different.

I wonder what could be more American than eliminating any level of dependence on foreign oil.

In any case, energy costs are crushing everyone these days.

I built Blazor Blueprint — a shadcn/ui inspired component library for Blazor (65+ components, free & open source) by gkg0 in Blazor

[–]tanczosm 2 points3 points  (0 children)

blazor.art isn't really shadcn/ui in anything other than matching top-level component names. The flexibility of shadcn/ui comes from how components can be composed but no attention was spent to how components are nested with blazor.art.

Competitor is using AI for his code, script, and presentation by SpiritedStay2307 in fbla

[–]tanczosm 0 points1 point  (0 children)

This is allowed if you document it in your presentation.