microsoft / microsoft/aspire-samples

Example: Blazor Custom Elements and Storybook UI via Aspire

Open
#87 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area-samples
Dominant language
C#
Stars
1.2k
Forks
345
Avg merge
3d 13h
Merged PRs (30d)
30

Description

I noticed that Blazor allows you to create custom elements

https://learn.microsoft.com/en-us/aspnet/core/blazor/components/js-spa-frameworks?view=aspnetcore-8.0#blazor-custom-elements

And, then I noticed that storybook supports web components

image

 
So, I am thinking about attempting to try and see if I can use a blazor web app or component library to build custom elements and try and get storybook to show it in its ui. Wanting to find and acknowledge any roadblocks or pain points with this approach and see if I can get at least something working with this.

So basically, we have a

graph LR
    aspireAppHost[Aspire App Host]
    storybookNpmApp[Storybook NPM App]
    blazorWebApp[Blazor Web App]
    blazorComponentLibrary[Blazor Component Library]

    aspireAppHost --> blazorWebApp
    aspireAppHost --> storybookNpmApp
    storybookNpmApp --> blazorWebApp
    blazorWebApp --> blazorComponentLibrary

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked Blazor custom-elements documentation and the Storybook web-components support described in the issue. Explore the Aspire App Host, Storybook NPM App, Blazor Web App, and Blazor Component Library arrangement shown in the diagram. Done would be a working sample that demonstrates the integration and records its roadblocks or pain points.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, storybook
Domain
frontend, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.